//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_spi(SotoInternal) import SotoCore

extension LakeFormation {
    // MARK: Enums

    public enum ApplicationStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case disabled = "DISABLED"
        case enabled = "ENABLED"
        public var description: String { return self.rawValue }
    }

    public enum ComparisonOperator: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case `in` = "IN"
        case beginsWith = "BEGINS_WITH"
        case between = "BETWEEN"
        case contains = "CONTAINS"
        case eq = "EQ"
        case ge = "GE"
        case gt = "GT"
        case le = "LE"
        case lt = "LT"
        case ne = "NE"
        case notContains = "NOT_CONTAINS"
        public var description: String { return self.rawValue }
    }

    public enum DataLakeResourceType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case catalog = "CATALOG"
        case dataLocation = "DATA_LOCATION"
        case database = "DATABASE"
        case lfNamedTagExpression = "LF_NAMED_TAG_EXPRESSION"
        case lfTag = "LF_TAG"
        case lfTagPolicy = "LF_TAG_POLICY"
        case lfTagPolicyDatabase = "LF_TAG_POLICY_DATABASE"
        case lfTagPolicyTable = "LF_TAG_POLICY_TABLE"
        case table = "TABLE"
        public var description: String { return self.rawValue }
    }

    public enum EnableStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case disabled = "DISABLED"
        case enabled = "ENABLED"
        public var description: String { return self.rawValue }
    }

    public enum FieldNameString: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case lastModified = "LAST_MODIFIED"
        case resourceArn = "RESOURCE_ARN"
        case roleArn = "ROLE_ARN"
        public var description: String { return self.rawValue }
    }

    public enum OptimizerType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case compaction = "COMPACTION"
        case garbageCollection = "GARBAGE_COLLECTION"
        case generic = "ALL"
        public var description: String { return self.rawValue }
    }

    public enum Permission: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case all = "ALL"
        case alter = "ALTER"
        case associate = "ASSOCIATE"
        case createCatalog = "CREATE_CATALOG"
        case createDatabase = "CREATE_DATABASE"
        case createLfTag = "CREATE_LF_TAG"
        case createLfTagExpression = "CREATE_LF_TAG_EXPRESSION"
        case createTable = "CREATE_TABLE"
        case dataLocationAccess = "DATA_LOCATION_ACCESS"
        case delete = "DELETE"
        case describe = "DESCRIBE"
        case drop = "DROP"
        case grantWithLfTagExpression = "GRANT_WITH_LF_TAG_EXPRESSION"
        case insert = "INSERT"
        case select = "SELECT"
        case superUser = "SUPER_USER"
        public var description: String { return self.rawValue }
    }

    public enum PermissionType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case cellFilterPermission = "CELL_FILTER_PERMISSION"
        case columnPermission = "COLUMN_PERMISSION"
        case nestedCellPermission = "NESTED_CELL_PERMISSION"
        case nestedPermission = "NESTED_PERMISSION"
        public var description: String { return self.rawValue }
    }

    public enum QueryStateString: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case error = "ERROR"
        case expired = "EXPIRED"
        case finished = "FINISHED"
        case pending = "PENDING"
        case workunitsAvailable = "WORKUNITS_AVAILABLE"
        public var description: String { return self.rawValue }
    }

    public enum ResourceShareType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case all = "ALL"
        case foreign = "FOREIGN"
        public var description: String { return self.rawValue }
    }

    public enum ResourceType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case database = "DATABASE"
        case table = "TABLE"
        public var description: String { return self.rawValue }
    }

    public enum TransactionStatus: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case aborted = "ABORTED"
        case active = "ACTIVE"
        case commitInProgress = "COMMIT_IN_PROGRESS"
        case committed = "COMMITTED"
        public var description: String { return self.rawValue }
    }

    public enum TransactionStatusFilter: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case aborted = "ABORTED"
        case active = "ACTIVE"
        case all = "ALL"
        case committed = "COMMITTED"
        case completed = "COMPLETED"
        public var description: String { return self.rawValue }
    }

    public enum TransactionType: String, CustomStringConvertible, Codable, Sendable, CodingKeyRepresentable {
        case readAndWrite = "READ_AND_WRITE"
        case readOnly = "READ_ONLY"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AddLFTagsToResourceRequest: AWSEncodableShape {
        /// The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment.
        public let catalogId: String?
        /// The LF-tags to attach to the resource.
        public let lfTags: [LFTagPair]
        /// The database, table, or column resource to which to attach an LF-tag.
        public let resource: Resource

        @inlinable
        public init(catalogId: String? = nil, lfTags: [LFTagPair], resource: Resource) {
            self.catalogId = catalogId
            self.lfTags = lfTags
            self.resource = resource
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.lfTags.forEach {
                try $0.validate(name: "\(name).lfTags[]")
            }
            try self.validate(self.lfTags, name: "lfTags", parent: name, max: 50)
            try self.validate(self.lfTags, name: "lfTags", parent: name, min: 1)
            try self.resource.validate(name: "\(name).resource")
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case lfTags = "LFTags"
            case resource = "Resource"
        }
    }

    public struct AddLFTagsToResourceResponse: AWSDecodableShape {
        /// A list of failures to tag the resource.
        public let failures: [LFTagError]?

        @inlinable
        public init(failures: [LFTagError]? = nil) {
            self.failures = failures
        }

        private enum CodingKeys: String, CodingKey {
            case failures = "Failures"
        }
    }

    public struct AddObjectInput: AWSEncodableShape {
        /// The Amazon S3 ETag of the object. Returned by GetTableObjects for validation and used to identify changes to the underlying data.
        public let eTag: String
        /// A list of partition values for the object. A value must be specified for each partition key associated with the table. The supported data types are integer, long, date(yyyy-MM-dd), timestamp(yyyy-MM-dd HH:mm:ssXXX or yyyy-MM-dd HH:mm:ss"), string and decimal.
        public let partitionValues: [String]?
        /// The size of the Amazon S3 object in bytes.
        public let size: Int64
        /// The Amazon S3 location of the object.
        public let uri: String

        @inlinable
        public init(eTag: String, partitionValues: [String]? = nil, size: Int64 = 0, uri: String) {
            self.eTag = eTag
            self.partitionValues = partitionValues
            self.size = size
            self.uri = uri
        }

        public func validate(name: String) throws {
            try self.validate(self.eTag, name: "eTag", parent: name, max: 255)
            try self.validate(self.eTag, name: "eTag", parent: name, min: 1)
            try self.validate(self.eTag, name: "eTag", parent: name, pattern: "^[\\p{L}\\p{N}\\p{P}]*$")
            try self.partitionValues?.forEach {
                try validate($0, name: "partitionValues[]", parent: name, max: 1024)
            }
            try self.validate(self.partitionValues, name: "partitionValues", parent: name, max: 100)
            try self.validate(self.partitionValues, name: "partitionValues", parent: name, min: 1)
            try self.validate(self.uri, name: "uri", parent: name, max: 1024)
            try self.validate(self.uri, name: "uri", parent: name, min: 1)
            try self.validate(self.uri, name: "uri", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case eTag = "ETag"
            case partitionValues = "PartitionValues"
            case size = "Size"
            case uri = "Uri"
        }
    }

    public struct AllRowsWildcard: AWSEncodableShape & AWSDecodableShape {
        public init() {}
    }

    public struct AssumeDecoratedRoleWithSAMLRequest: AWSEncodableShape {
        /// The time period, between 900 and 43,200 seconds, for the timeout of the temporary credentials.
        public let durationSeconds: Int?
        /// The Amazon Resource Name (ARN) of the SAML provider in IAM that describes the IdP.
        public let principalArn: String
        /// The role that represents an IAM principal whose scope down policy allows it to call credential vending APIs such as GetTemporaryTableCredentials. The caller must also have iam:PassRole permission on this role.
        public let roleArn: String
        /// A SAML assertion consisting of an assertion statement for the user who needs temporary credentials. This must match the SAML assertion that was issued to IAM. This must be Base64 encoded.
        public let samlAssertion: String

        @inlinable
        public init(durationSeconds: Int? = nil, principalArn: String, roleArn: String, samlAssertion: String) {
            self.durationSeconds = durationSeconds
            self.principalArn = principalArn
            self.roleArn = roleArn
            self.samlAssertion = samlAssertion
        }

        public func validate(name: String) throws {
            try self.validate(self.durationSeconds, name: "durationSeconds", parent: name, max: 43200)
            try self.validate(self.durationSeconds, name: "durationSeconds", parent: name, min: 900)
            try self.validate(self.principalArn, name: "principalArn", parent: name, pattern: "^arn:aws:iam::[0-9]*:saml-provider/")
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:aws:iam::[0-9]*:role/")
            try self.validate(self.samlAssertion, name: "samlAssertion", parent: name, max: 100000)
            try self.validate(self.samlAssertion, name: "samlAssertion", parent: name, min: 4)
        }

        private enum CodingKeys: String, CodingKey {
            case durationSeconds = "DurationSeconds"
            case principalArn = "PrincipalArn"
            case roleArn = "RoleArn"
            case samlAssertion = "SAMLAssertion"
        }
    }

    public struct AssumeDecoratedRoleWithSAMLResponse: AWSDecodableShape {
        /// The access key ID for the temporary credentials. (The access key consists of an access key ID and a secret key).
        public let accessKeyId: String?
        /// The date and time when the temporary credentials expire.
        public let expiration: Date?
        /// The secret key for the temporary credentials. (The access key consists of an access key ID and a secret key).
        public let secretAccessKey: String?
        /// The session token for the temporary credentials.
        public let sessionToken: String?

        @inlinable
        public init(accessKeyId: String? = nil, expiration: Date? = nil, secretAccessKey: String? = nil, sessionToken: String? = nil) {
            self.accessKeyId = accessKeyId
            self.expiration = expiration
            self.secretAccessKey = secretAccessKey
            self.sessionToken = sessionToken
        }

        private enum CodingKeys: String, CodingKey {
            case accessKeyId = "AccessKeyId"
            case expiration = "Expiration"
            case secretAccessKey = "SecretAccessKey"
            case sessionToken = "SessionToken"
        }
    }

    public struct AuditContext: AWSEncodableShape {
        /// The filter engine can populate the 'AdditionalAuditContext' information with the request ID for you to track. This information will be displayed in CloudTrail log in your account.
        public let additionalAuditContext: String?

        @inlinable
        public init(additionalAuditContext: String? = nil) {
            self.additionalAuditContext = additionalAuditContext
        }

        public func validate(name: String) throws {
            try self.validate(self.additionalAuditContext, name: "additionalAuditContext", parent: name, max: 2048)
            try self.validate(self.additionalAuditContext, name: "additionalAuditContext", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case additionalAuditContext = "AdditionalAuditContext"
        }
    }

    public struct BatchGrantPermissionsRequest: AWSEncodableShape {
        /// The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment.
        public let catalogId: String?
        /// A list of up to 20 entries for resource permissions to be granted by batch operation to the principal.
        public let entries: [BatchPermissionsRequestEntry]

        @inlinable
        public init(catalogId: String? = nil, entries: [BatchPermissionsRequestEntry]) {
            self.catalogId = catalogId
            self.entries = entries
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.entries.forEach {
                try $0.validate(name: "\(name).entries[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case entries = "Entries"
        }
    }

    public struct BatchGrantPermissionsResponse: AWSDecodableShape {
        /// A list of failures to grant permissions to the resources.
        public let failures: [BatchPermissionsFailureEntry]?

        @inlinable
        public init(failures: [BatchPermissionsFailureEntry]? = nil) {
            self.failures = failures
        }

        private enum CodingKeys: String, CodingKey {
            case failures = "Failures"
        }
    }

    public struct BatchPermissionsFailureEntry: AWSDecodableShape {
        /// An error message that applies to the failure of the entry.
        public let error: ErrorDetail?
        /// An identifier for an entry of the batch request.
        public let requestEntry: BatchPermissionsRequestEntry?

        @inlinable
        public init(error: ErrorDetail? = nil, requestEntry: BatchPermissionsRequestEntry? = nil) {
            self.error = error
            self.requestEntry = requestEntry
        }

        private enum CodingKeys: String, CodingKey {
            case error = "Error"
            case requestEntry = "RequestEntry"
        }
    }

    public struct BatchPermissionsRequestEntry: AWSEncodableShape & AWSDecodableShape {
        public let condition: Condition?
        /// A unique identifier for the batch permissions request entry.
        public let id: String
        /// The permissions to be granted.
        public let permissions: [Permission]?
        /// Indicates if the option to pass permissions is granted.
        public let permissionsWithGrantOption: [Permission]?
        /// The principal to be granted a permission.
        public let principal: DataLakePrincipal?
        /// The resource to which the principal is to be granted a permission.
        public let resource: Resource?

        @inlinable
        public init(condition: Condition? = nil, id: String, permissions: [Permission]? = nil, permissionsWithGrantOption: [Permission]? = nil, principal: DataLakePrincipal? = nil, resource: Resource? = nil) {
            self.condition = condition
            self.id = id
            self.permissions = permissions
            self.permissionsWithGrantOption = permissionsWithGrantOption
            self.principal = principal
            self.resource = resource
        }

        public func validate(name: String) throws {
            try self.condition?.validate(name: "\(name).condition")
            try self.validate(self.id, name: "id", parent: name, max: 255)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.principal?.validate(name: "\(name).principal")
            try self.resource?.validate(name: "\(name).resource")
        }

        private enum CodingKeys: String, CodingKey {
            case condition = "Condition"
            case id = "Id"
            case permissions = "Permissions"
            case permissionsWithGrantOption = "PermissionsWithGrantOption"
            case principal = "Principal"
            case resource = "Resource"
        }
    }

    public struct BatchRevokePermissionsRequest: AWSEncodableShape {
        /// The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment.
        public let catalogId: String?
        /// A list of up to 20 entries for resource permissions to be revoked by batch operation to the principal.
        public let entries: [BatchPermissionsRequestEntry]

        @inlinable
        public init(catalogId: String? = nil, entries: [BatchPermissionsRequestEntry]) {
            self.catalogId = catalogId
            self.entries = entries
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.entries.forEach {
                try $0.validate(name: "\(name).entries[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case entries = "Entries"
        }
    }

    public struct BatchRevokePermissionsResponse: AWSDecodableShape {
        /// A list of failures to revoke permissions to the resources.
        public let failures: [BatchPermissionsFailureEntry]?

        @inlinable
        public init(failures: [BatchPermissionsFailureEntry]? = nil) {
            self.failures = failures
        }

        private enum CodingKeys: String, CodingKey {
            case failures = "Failures"
        }
    }

    public struct CancelTransactionRequest: AWSEncodableShape {
        /// The transaction to cancel.
        public let transactionId: String

        @inlinable
        public init(transactionId: String) {
            self.transactionId = transactionId
        }

        public func validate(name: String) throws {
            try self.validate(self.transactionId, name: "transactionId", parent: name, max: 255)
            try self.validate(self.transactionId, name: "transactionId", parent: name, min: 1)
            try self.validate(self.transactionId, name: "transactionId", parent: name, pattern: "^[\\p{L}\\p{N}\\p{P}]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case transactionId = "TransactionId"
        }
    }

    public struct CancelTransactionResponse: AWSDecodableShape {
        public init() {}
    }

    public struct CatalogResource: AWSEncodableShape & AWSDecodableShape {
        /// An identifier for the catalog resource.
        public let id: String?

        @inlinable
        public init(id: String? = nil) {
            self.id = id
        }

        public func validate(name: String) throws {
            try self.validate(self.id, name: "id", parent: name, max: 255)
            try self.validate(self.id, name: "id", parent: name, min: 1)
            try self.validate(self.id, name: "id", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case id = "Id"
        }
    }

    public struct ColumnLFTag: AWSDecodableShape {
        /// The LF-tags attached to a column resource.
        public let lfTags: [LFTagPair]?
        /// The name of a column resource.
        public let name: String?

        @inlinable
        public init(lfTags: [LFTagPair]? = nil, name: String? = nil) {
            self.lfTags = lfTags
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case lfTags = "LFTags"
            case name = "Name"
        }
    }

    public struct ColumnWildcard: AWSEncodableShape & AWSDecodableShape {
        /// Excludes column names. Any column with this name will be excluded.
        public let excludedColumnNames: [String]?

        @inlinable
        public init(excludedColumnNames: [String]? = nil) {
            self.excludedColumnNames = excludedColumnNames
        }

        public func validate(name: String) throws {
            try self.excludedColumnNames?.forEach {
                try validate($0, name: "excludedColumnNames[]", parent: name, max: 255)
                try validate($0, name: "excludedColumnNames[]", parent: name, min: 1)
                try validate($0, name: "excludedColumnNames[]", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case excludedColumnNames = "ExcludedColumnNames"
        }
    }

    public struct CommitTransactionRequest: AWSEncodableShape {
        /// The transaction to commit.
        public let transactionId: String

        @inlinable
        public init(transactionId: String) {
            self.transactionId = transactionId
        }

        public func validate(name: String) throws {
            try self.validate(self.transactionId, name: "transactionId", parent: name, max: 255)
            try self.validate(self.transactionId, name: "transactionId", parent: name, min: 1)
            try self.validate(self.transactionId, name: "transactionId", parent: name, pattern: "^[\\p{L}\\p{N}\\p{P}]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case transactionId = "TransactionId"
        }
    }

    public struct CommitTransactionResponse: AWSDecodableShape {
        /// The status of the transaction.
        public let transactionStatus: TransactionStatus?

        @inlinable
        public init(transactionStatus: TransactionStatus? = nil) {
            self.transactionStatus = transactionStatus
        }

        private enum CodingKeys: String, CodingKey {
            case transactionStatus = "TransactionStatus"
        }
    }

    public struct Condition: AWSEncodableShape & AWSDecodableShape {
        /// An expression written based on the Cedar Policy Language used to match the principal attributes.
        public let expression: String?

        @inlinable
        public init(expression: String? = nil) {
            self.expression = expression
        }

        public func validate(name: String) throws {
            try self.validate(self.expression, name: "expression", parent: name, max: 3000)
        }

        private enum CodingKeys: String, CodingKey {
            case expression = "Expression"
        }
    }

    public struct CreateDataCellsFilterRequest: AWSEncodableShape {
        /// A DataCellsFilter structure containing information about the data cells filter.
        public let tableData: DataCellsFilter

        @inlinable
        public init(tableData: DataCellsFilter) {
            self.tableData = tableData
        }

        public func validate(name: String) throws {
            try self.tableData.validate(name: "\(name).tableData")
        }

        private enum CodingKeys: String, CodingKey {
            case tableData = "TableData"
        }
    }

    public struct CreateDataCellsFilterResponse: AWSDecodableShape {
        public init() {}
    }

    public struct CreateLFTagExpressionRequest: AWSEncodableShape {
        /// The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment.
        public let catalogId: String?
        /// A description with information about the LF-Tag expression.
        public let description: String?
        /// A list of LF-Tag conditions (key-value pairs).
        public let expression: [LFTag]
        /// A name for the expression.
        public let name: String

        @inlinable
        public init(catalogId: String? = nil, description: String? = nil, expression: [LFTag], name: String) {
            self.catalogId = catalogId
            self.description = description
            self.expression = expression
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.description, name: "description", parent: name, max: 2048)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.expression.forEach {
                try $0.validate(name: "\(name).expression[]")
            }
            try self.validate(self.name, name: "name", parent: name, max: 255)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case description = "Description"
            case expression = "Expression"
            case name = "Name"
        }
    }

    public struct CreateLFTagExpressionResponse: AWSDecodableShape {
        public init() {}
    }

    public struct CreateLFTagRequest: AWSEncodableShape {
        /// The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment.
        public let catalogId: String?
        /// The key-name for the LF-tag.
        public let tagKey: String
        /// A list of possible values an attribute can take.
        public let tagValues: [String]

        @inlinable
        public init(catalogId: String? = nil, tagKey: String, tagValues: [String]) {
            self.catalogId = catalogId
            self.tagKey = tagKey
            self.tagValues = tagValues
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.tagKey, name: "tagKey", parent: name, max: 128)
            try self.validate(self.tagKey, name: "tagKey", parent: name, min: 1)
            try self.validate(self.tagKey, name: "tagKey", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:\\/=+\\-@%]*)$")
            try self.tagValues.forEach {
                try validate($0, name: "tagValues[]", parent: name, max: 256)
                try validate($0, name: "tagValues[]", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:\\*\\/=+\\-@%]*)$")
            }
            try self.validate(self.tagValues, name: "tagValues", parent: name, max: 50)
            try self.validate(self.tagValues, name: "tagValues", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case tagKey = "TagKey"
            case tagValues = "TagValues"
        }
    }

    public struct CreateLFTagResponse: AWSDecodableShape {
        public init() {}
    }

    public struct CreateLakeFormationIdentityCenterConfigurationRequest: AWSEncodableShape {
        /// The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, view definitions, and other control information to manage your Lake Formation environment.
        public let catalogId: String?
        /// A list of the account IDs of Amazon Web Services accounts of third-party applications that are allowed to access data managed by Lake Formation.
        public let externalFiltering: ExternalFilteringConfiguration?
        /// The ARN of the IAM Identity Center instance for which the operation will be executed. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces in the Amazon Web Services General Reference.
        public let instanceArn: String?
        /// A list of Amazon Web Services account IDs and/or Amazon Web Services organization/organizational unit ARNs that are allowed to access data managed by Lake Formation.  If the ShareRecipients list includes valid values, a resource share is created with the principals you want to have access to the resources. If the ShareRecipients value is null or the list is empty, no resource share is created.
        public let shareRecipients: [DataLakePrincipal]?

        @inlinable
        public init(catalogId: String? = nil, externalFiltering: ExternalFilteringConfiguration? = nil, instanceArn: String? = nil, shareRecipients: [DataLakePrincipal]? = nil) {
            self.catalogId = catalogId
            self.externalFiltering = externalFiltering
            self.instanceArn = instanceArn
            self.shareRecipients = shareRecipients
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.shareRecipients?.forEach {
                try $0.validate(name: "\(name).shareRecipients[]")
            }
            try self.validate(self.shareRecipients, name: "shareRecipients", parent: name, max: 30)
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case externalFiltering = "ExternalFiltering"
            case instanceArn = "InstanceArn"
            case shareRecipients = "ShareRecipients"
        }
    }

    public struct CreateLakeFormationIdentityCenterConfigurationResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the Lake Formation application integrated with IAM Identity Center.
        public let applicationArn: String?

        @inlinable
        public init(applicationArn: String? = nil) {
            self.applicationArn = applicationArn
        }

        private enum CodingKeys: String, CodingKey {
            case applicationArn = "ApplicationArn"
        }
    }

    public struct CreateLakeFormationOptInRequest: AWSEncodableShape {
        public let condition: Condition?
        public let principal: DataLakePrincipal
        public let resource: Resource

        @inlinable
        public init(condition: Condition? = nil, principal: DataLakePrincipal, resource: Resource) {
            self.condition = condition
            self.principal = principal
            self.resource = resource
        }

        public func validate(name: String) throws {
            try self.condition?.validate(name: "\(name).condition")
            try self.principal.validate(name: "\(name).principal")
            try self.resource.validate(name: "\(name).resource")
        }

        private enum CodingKeys: String, CodingKey {
            case condition = "Condition"
            case principal = "Principal"
            case resource = "Resource"
        }
    }

    public struct CreateLakeFormationOptInResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DataCellsFilter: AWSEncodableShape & AWSDecodableShape {
        /// A list of column names and/or nested column attributes. When specifying nested attributes, use a qualified dot (.) delimited format such as "address"."zip". Nested attributes within this list may not exceed a depth of 5.
        public let columnNames: [String]?
        /// A wildcard with exclusions. You must specify either a ColumnNames list or the ColumnWildCard.
        public let columnWildcard: ColumnWildcard?
        /// A database in the Glue Data Catalog.
        public let databaseName: String
        /// The name given by the user to the data filter cell.
        public let name: String
        /// A PartiQL predicate.
        public let rowFilter: RowFilter?
        /// The ID of the catalog to which the table belongs.
        public let tableCatalogId: String
        /// A table in the database.
        public let tableName: String
        /// The ID of the data cells filter version.
        public let versionId: String?

        @inlinable
        public init(columnNames: [String]? = nil, columnWildcard: ColumnWildcard? = nil, databaseName: String, name: String, rowFilter: RowFilter? = nil, tableCatalogId: String, tableName: String, versionId: String? = nil) {
            self.columnNames = columnNames
            self.columnWildcard = columnWildcard
            self.databaseName = databaseName
            self.name = name
            self.rowFilter = rowFilter
            self.tableCatalogId = tableCatalogId
            self.tableName = tableName
            self.versionId = versionId
        }

        public func validate(name: String) throws {
            try self.columnNames?.forEach {
                try validate($0, name: "columnNames[]", parent: name, max: 255)
                try validate($0, name: "columnNames[]", parent: name, min: 1)
                try validate($0, name: "columnNames[]", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            }
            try self.columnWildcard?.validate(name: "\(name).columnWildcard")
            try self.validate(self.databaseName, name: "databaseName", parent: name, max: 255)
            try self.validate(self.databaseName, name: "databaseName", parent: name, min: 1)
            try self.validate(self.databaseName, name: "databaseName", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.name, name: "name", parent: name, max: 255)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.rowFilter?.validate(name: "\(name).rowFilter")
            try self.validate(self.tableCatalogId, name: "tableCatalogId", parent: name, max: 255)
            try self.validate(self.tableCatalogId, name: "tableCatalogId", parent: name, min: 1)
            try self.validate(self.tableCatalogId, name: "tableCatalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.tableName, name: "tableName", parent: name, max: 255)
            try self.validate(self.tableName, name: "tableName", parent: name, min: 1)
            try self.validate(self.tableName, name: "tableName", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.versionId, name: "versionId", parent: name, max: 255)
            try self.validate(self.versionId, name: "versionId", parent: name, min: 1)
            try self.validate(self.versionId, name: "versionId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case columnNames = "ColumnNames"
            case columnWildcard = "ColumnWildcard"
            case databaseName = "DatabaseName"
            case name = "Name"
            case rowFilter = "RowFilter"
            case tableCatalogId = "TableCatalogId"
            case tableName = "TableName"
            case versionId = "VersionId"
        }
    }

    public struct DataCellsFilterResource: AWSEncodableShape & AWSDecodableShape {
        /// A database in the Glue Data Catalog.
        public let databaseName: String?
        /// The name of the data cells filter.
        public let name: String?
        /// The ID of the catalog to which the table belongs.
        public let tableCatalogId: String?
        /// The name of the table.
        public let tableName: String?

        @inlinable
        public init(databaseName: String? = nil, name: String? = nil, tableCatalogId: String? = nil, tableName: String? = nil) {
            self.databaseName = databaseName
            self.name = name
            self.tableCatalogId = tableCatalogId
            self.tableName = tableName
        }

        public func validate(name: String) throws {
            try self.validate(self.databaseName, name: "databaseName", parent: name, max: 255)
            try self.validate(self.databaseName, name: "databaseName", parent: name, min: 1)
            try self.validate(self.databaseName, name: "databaseName", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.name, name: "name", parent: name, max: 255)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.tableCatalogId, name: "tableCatalogId", parent: name, max: 255)
            try self.validate(self.tableCatalogId, name: "tableCatalogId", parent: name, min: 1)
            try self.validate(self.tableCatalogId, name: "tableCatalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.tableName, name: "tableName", parent: name, max: 255)
            try self.validate(self.tableName, name: "tableName", parent: name, min: 1)
            try self.validate(self.tableName, name: "tableName", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case databaseName = "DatabaseName"
            case name = "Name"
            case tableCatalogId = "TableCatalogId"
            case tableName = "TableName"
        }
    }

    public struct DataLakePrincipal: AWSEncodableShape & AWSDecodableShape {
        /// An identifier for the Lake Formation principal.
        public let dataLakePrincipalIdentifier: String?

        @inlinable
        public init(dataLakePrincipalIdentifier: String? = nil) {
            self.dataLakePrincipalIdentifier = dataLakePrincipalIdentifier
        }

        public func validate(name: String) throws {
            try self.validate(self.dataLakePrincipalIdentifier, name: "dataLakePrincipalIdentifier", parent: name, max: 255)
            try self.validate(self.dataLakePrincipalIdentifier, name: "dataLakePrincipalIdentifier", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case dataLakePrincipalIdentifier = "DataLakePrincipalIdentifier"
        }
    }

    public struct DataLakeSettings: AWSEncodableShape & AWSDecodableShape {
        /// Whether to allow Amazon EMR clusters to access data managed by Lake Formation.  If true, you allow Amazon EMR clusters to access data in Amazon S3 locations that are registered with Lake Formation. If false or null, no Amazon EMR clusters will be able to access data in Amazon S3 locations that are registered with Lake Formation. For more information, see (Optional) Allow external data filtering.
        public let allowExternalDataFiltering: Bool?
        /// Whether to allow a third-party query engine to get data access credentials without session tags when a caller has full data access permissions.
        public let allowFullTableExternalDataAccess: Bool?
        /// Lake Formation relies on a privileged process secured by Amazon EMR or the third party integrator to tag the user's role while assuming it. Lake Formation will publish the acceptable key-value pair, for example key = "LakeFormationTrustedCaller" and value = "TRUE" and the third party integrator must properly tag the temporary security credentials that will be used to call Lake Formation's administrative APIs.
        public let authorizedSessionTagValueList: [String]?
        /// Specifies whether access control on newly created database is managed by Lake Formation permissions or exclusively by IAM permissions. A null value indicates access control by Lake Formation permissions. A value that assigns ALL to IAM_ALLOWED_PRINCIPALS indicates access control by IAM permissions. This is referred to as the setting "Use only IAM access control," and is for backward compatibility with the Glue permission model implemented by IAM permissions. The only permitted values are an empty array or an array that contains a single JSON object that grants ALL to IAM_ALLOWED_PRINCIPALS. For more information, see Changing the Default Security Settings for Your Data Lake.
        public let createDatabaseDefaultPermissions: [PrincipalPermissions]?
        /// Specifies whether access control on newly created table is managed by Lake Formation permissions or exclusively by IAM permissions. A null value indicates access control by Lake Formation permissions. A value that assigns ALL to IAM_ALLOWED_PRINCIPALS indicates access control by IAM permissions. This is referred to as the setting "Use only IAM access control," and is for backward compatibility with the Glue permission model implemented by IAM permissions. The only permitted values are an empty array or an array that contains a single JSON object that grants ALL to IAM_ALLOWED_PRINCIPALS. For more information, see Changing the Default Security Settings for Your Data Lake.
        public let createTableDefaultPermissions: [PrincipalPermissions]?
        /// A list of Lake Formation principals. Supported principals are IAM users or IAM roles.
        public let dataLakeAdmins: [DataLakePrincipal]?
        /// A list of the account IDs of Amazon Web Services accounts with Amazon EMR clusters that are to perform data filtering.>
        public let externalDataFilteringAllowList: [DataLakePrincipal]?
        /// A key-value map that provides an additional configuration on your data lake. CROSS_ACCOUNT_VERSION is the key you can configure in the Parameters field. Accepted values for the CrossAccountVersion key are 1, 2, 3, and 4.
        public let parameters: [String: String]?
        /// A list of Lake Formation principals with only view access to the resources, without the ability to make changes. Supported principals are IAM users or IAM roles.
        public let readOnlyAdmins: [DataLakePrincipal]?
        /// A list of the resource-owning account IDs that the caller's account can use to share their user access details (user ARNs). The user ARNs can be logged in the resource owner's CloudTrail log. You may want to specify this property when you are in a high-trust boundary, such as the same team or company.
        public let trustedResourceOwners: [String]?

        @inlinable
        public init(allowExternalDataFiltering: Bool? = nil, allowFullTableExternalDataAccess: Bool? = nil, authorizedSessionTagValueList: [String]? = nil, createDatabaseDefaultPermissions: [PrincipalPermissions]? = nil, createTableDefaultPermissions: [PrincipalPermissions]? = nil, dataLakeAdmins: [DataLakePrincipal]? = nil, externalDataFilteringAllowList: [DataLakePrincipal]? = nil, parameters: [String: String]? = nil, readOnlyAdmins: [DataLakePrincipal]? = nil, trustedResourceOwners: [String]? = nil) {
            self.allowExternalDataFiltering = allowExternalDataFiltering
            self.allowFullTableExternalDataAccess = allowFullTableExternalDataAccess
            self.authorizedSessionTagValueList = authorizedSessionTagValueList
            self.createDatabaseDefaultPermissions = createDatabaseDefaultPermissions
            self.createTableDefaultPermissions = createTableDefaultPermissions
            self.dataLakeAdmins = dataLakeAdmins
            self.externalDataFilteringAllowList = externalDataFilteringAllowList
            self.parameters = parameters
            self.readOnlyAdmins = readOnlyAdmins
            self.trustedResourceOwners = trustedResourceOwners
        }

        public func validate(name: String) throws {
            try self.authorizedSessionTagValueList?.forEach {
                try validate($0, name: "authorizedSessionTagValueList[]", parent: name, max: 255)
                try validate($0, name: "authorizedSessionTagValueList[]", parent: name, min: 1)
                try validate($0, name: "authorizedSessionTagValueList[]", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            }
            try self.createDatabaseDefaultPermissions?.forEach {
                try $0.validate(name: "\(name).createDatabaseDefaultPermissions[]")
            }
            try self.createTableDefaultPermissions?.forEach {
                try $0.validate(name: "\(name).createTableDefaultPermissions[]")
            }
            try self.dataLakeAdmins?.forEach {
                try $0.validate(name: "\(name).dataLakeAdmins[]")
            }
            try self.validate(self.dataLakeAdmins, name: "dataLakeAdmins", parent: name, max: 30)
            try self.externalDataFilteringAllowList?.forEach {
                try $0.validate(name: "\(name).externalDataFilteringAllowList[]")
            }
            try self.validate(self.externalDataFilteringAllowList, name: "externalDataFilteringAllowList", parent: name, max: 30)
            try self.parameters?.forEach {
                try validate($0.key, name: "parameters.key", parent: name, max: 255)
                try validate($0.key, name: "parameters.key", parent: name, min: 1)
                try validate($0.key, name: "parameters.key", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
                try validate($0.value, name: "parameters[\"\($0.key)\"]", parent: name, max: 512000)
            }
            try self.readOnlyAdmins?.forEach {
                try $0.validate(name: "\(name).readOnlyAdmins[]")
            }
            try self.validate(self.readOnlyAdmins, name: "readOnlyAdmins", parent: name, max: 30)
            try self.trustedResourceOwners?.forEach {
                try validate($0, name: "trustedResourceOwners[]", parent: name, max: 255)
                try validate($0, name: "trustedResourceOwners[]", parent: name, min: 1)
                try validate($0, name: "trustedResourceOwners[]", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case allowExternalDataFiltering = "AllowExternalDataFiltering"
            case allowFullTableExternalDataAccess = "AllowFullTableExternalDataAccess"
            case authorizedSessionTagValueList = "AuthorizedSessionTagValueList"
            case createDatabaseDefaultPermissions = "CreateDatabaseDefaultPermissions"
            case createTableDefaultPermissions = "CreateTableDefaultPermissions"
            case dataLakeAdmins = "DataLakeAdmins"
            case externalDataFilteringAllowList = "ExternalDataFilteringAllowList"
            case parameters = "Parameters"
            case readOnlyAdmins = "ReadOnlyAdmins"
            case trustedResourceOwners = "TrustedResourceOwners"
        }
    }

    public struct DataLocationResource: AWSEncodableShape & AWSDecodableShape {
        /// The identifier for the Data Catalog where the location is registered with Lake Formation. By default, it is the account ID of the caller.
        public let catalogId: String?
        /// The Amazon Resource Name (ARN) that uniquely identifies the data location resource.
        public let resourceArn: String

        @inlinable
        public init(catalogId: String? = nil, resourceArn: String) {
            self.catalogId = catalogId
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case resourceArn = "ResourceArn"
        }
    }

    public struct DatabaseResource: AWSEncodableShape & AWSDecodableShape {
        /// The identifier for the Data Catalog. By default, it is the account ID of the caller.
        public let catalogId: String?
        /// The name of the database resource. Unique to the Data Catalog.
        public let name: String

        @inlinable
        public init(catalogId: String? = nil, name: String) {
            self.catalogId = catalogId
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.name, name: "name", parent: name, max: 255)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case name = "Name"
        }
    }

    public struct DeleteDataCellsFilterRequest: AWSEncodableShape {
        /// A database in the Glue Data Catalog.
        public let databaseName: String?
        /// The name given by the user to the data filter cell.
        public let name: String?
        /// The ID of the catalog to which the table belongs.
        public let tableCatalogId: String?
        /// A table in the database.
        public let tableName: String?

        @inlinable
        public init(databaseName: String? = nil, name: String? = nil, tableCatalogId: String? = nil, tableName: String? = nil) {
            self.databaseName = databaseName
            self.name = name
            self.tableCatalogId = tableCatalogId
            self.tableName = tableName
        }

        public func validate(name: String) throws {
            try self.validate(self.databaseName, name: "databaseName", parent: name, max: 255)
            try self.validate(self.databaseName, name: "databaseName", parent: name, min: 1)
            try self.validate(self.databaseName, name: "databaseName", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.name, name: "name", parent: name, max: 255)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.tableCatalogId, name: "tableCatalogId", parent: name, max: 255)
            try self.validate(self.tableCatalogId, name: "tableCatalogId", parent: name, min: 1)
            try self.validate(self.tableCatalogId, name: "tableCatalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.tableName, name: "tableName", parent: name, max: 255)
            try self.validate(self.tableName, name: "tableName", parent: name, min: 1)
            try self.validate(self.tableName, name: "tableName", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case databaseName = "DatabaseName"
            case name = "Name"
            case tableCatalogId = "TableCatalogId"
            case tableName = "TableName"
        }
    }

    public struct DeleteDataCellsFilterResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteLFTagExpressionRequest: AWSEncodableShape {
        /// The identifier for the Data Catalog. By default, the account ID in which the LF-Tag expression is saved.
        public let catalogId: String?
        /// The name for the LF-Tag expression.
        public let name: String

        @inlinable
        public init(catalogId: String? = nil, name: String) {
            self.catalogId = catalogId
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.name, name: "name", parent: name, max: 255)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case name = "Name"
        }
    }

    public struct DeleteLFTagExpressionResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteLFTagRequest: AWSEncodableShape {
        /// The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment.
        public let catalogId: String?
        /// The key-name for the LF-tag to delete.
        public let tagKey: String

        @inlinable
        public init(catalogId: String? = nil, tagKey: String) {
            self.catalogId = catalogId
            self.tagKey = tagKey
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.tagKey, name: "tagKey", parent: name, max: 128)
            try self.validate(self.tagKey, name: "tagKey", parent: name, min: 1)
            try self.validate(self.tagKey, name: "tagKey", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:\\/=+\\-@%]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case tagKey = "TagKey"
        }
    }

    public struct DeleteLFTagResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteLakeFormationIdentityCenterConfigurationRequest: AWSEncodableShape {
        /// The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, view definition, and other control information to manage your Lake Formation environment.
        public let catalogId: String?

        @inlinable
        public init(catalogId: String? = nil) {
            self.catalogId = catalogId
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
        }
    }

    public struct DeleteLakeFormationIdentityCenterConfigurationResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteLakeFormationOptInRequest: AWSEncodableShape {
        public let condition: Condition?
        public let principal: DataLakePrincipal
        public let resource: Resource

        @inlinable
        public init(condition: Condition? = nil, principal: DataLakePrincipal, resource: Resource) {
            self.condition = condition
            self.principal = principal
            self.resource = resource
        }

        public func validate(name: String) throws {
            try self.condition?.validate(name: "\(name).condition")
            try self.principal.validate(name: "\(name).principal")
            try self.resource.validate(name: "\(name).resource")
        }

        private enum CodingKeys: String, CodingKey {
            case condition = "Condition"
            case principal = "Principal"
            case resource = "Resource"
        }
    }

    public struct DeleteLakeFormationOptInResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteObjectInput: AWSEncodableShape {
        /// The Amazon S3 ETag of the object. Returned by GetTableObjects for validation and used to identify changes to the underlying data.
        public let eTag: String?
        /// A list of partition values for the object. A value must be specified for each partition key associated with the governed table.
        public let partitionValues: [String]?
        /// The Amazon S3 location of the object to delete.
        public let uri: String

        @inlinable
        public init(eTag: String? = nil, partitionValues: [String]? = nil, uri: String) {
            self.eTag = eTag
            self.partitionValues = partitionValues
            self.uri = uri
        }

        public func validate(name: String) throws {
            try self.validate(self.eTag, name: "eTag", parent: name, max: 255)
            try self.validate(self.eTag, name: "eTag", parent: name, min: 1)
            try self.validate(self.eTag, name: "eTag", parent: name, pattern: "^[\\p{L}\\p{N}\\p{P}]*$")
            try self.partitionValues?.forEach {
                try validate($0, name: "partitionValues[]", parent: name, max: 1024)
            }
            try self.validate(self.partitionValues, name: "partitionValues", parent: name, max: 100)
            try self.validate(self.partitionValues, name: "partitionValues", parent: name, min: 1)
            try self.validate(self.uri, name: "uri", parent: name, max: 1024)
            try self.validate(self.uri, name: "uri", parent: name, min: 1)
            try self.validate(self.uri, name: "uri", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case eTag = "ETag"
            case partitionValues = "PartitionValues"
            case uri = "Uri"
        }
    }

    public struct DeleteObjectsOnCancelRequest: AWSEncodableShape {
        /// The Glue data catalog that contains the governed table. Defaults to the current account ID.
        public let catalogId: String?
        /// The database that contains the governed table.
        public let databaseName: String
        /// A list of VirtualObject structures, which indicates the Amazon S3 objects to be deleted if the transaction cancels.
        public let objects: [VirtualObject]
        /// The name of the governed table.
        public let tableName: String
        /// ID of the transaction that the writes occur in.
        public let transactionId: String

        @inlinable
        public init(catalogId: String? = nil, databaseName: String, objects: [VirtualObject], tableName: String, transactionId: String) {
            self.catalogId = catalogId
            self.databaseName = databaseName
            self.objects = objects
            self.tableName = tableName
            self.transactionId = transactionId
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.databaseName, name: "databaseName", parent: name, max: 255)
            try self.validate(self.databaseName, name: "databaseName", parent: name, min: 1)
            try self.validate(self.databaseName, name: "databaseName", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.objects.forEach {
                try $0.validate(name: "\(name).objects[]")
            }
            try self.validate(self.objects, name: "objects", parent: name, max: 100)
            try self.validate(self.objects, name: "objects", parent: name, min: 1)
            try self.validate(self.tableName, name: "tableName", parent: name, max: 255)
            try self.validate(self.tableName, name: "tableName", parent: name, min: 1)
            try self.validate(self.tableName, name: "tableName", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.transactionId, name: "transactionId", parent: name, max: 255)
            try self.validate(self.transactionId, name: "transactionId", parent: name, min: 1)
            try self.validate(self.transactionId, name: "transactionId", parent: name, pattern: "^[\\p{L}\\p{N}\\p{P}]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case databaseName = "DatabaseName"
            case objects = "Objects"
            case tableName = "TableName"
            case transactionId = "TransactionId"
        }
    }

    public struct DeleteObjectsOnCancelResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeregisterResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the resource that you want to deregister.
        public let resourceArn: String

        @inlinable
        public init(resourceArn: String) {
            self.resourceArn = resourceArn
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
        }
    }

    public struct DeregisterResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DescribeLakeFormationIdentityCenterConfigurationRequest: AWSEncodableShape {
        /// The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment.
        public let catalogId: String?

        @inlinable
        public init(catalogId: String? = nil) {
            self.catalogId = catalogId
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
        }
    }

    public struct DescribeLakeFormationIdentityCenterConfigurationResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the Lake Formation application integrated with IAM Identity Center.
        public let applicationArn: String?
        /// The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment.
        public let catalogId: String?
        /// Indicates if external filtering is enabled.
        public let externalFiltering: ExternalFilteringConfiguration?
        /// The Amazon Resource Name (ARN) of the connection.
        public let instanceArn: String?
        /// The Amazon Resource Name (ARN) of the RAM share.
        public let resourceShare: String?
        /// A list of Amazon Web Services account IDs or Amazon Web Services organization/organizational unit ARNs that are allowed to access data managed by Lake Formation.  If the ShareRecipients list includes valid values, a resource share is created with the principals you want to have access to the resources as the ShareRecipients. If the ShareRecipients value is null or the list is empty, no resource share is created.
        public let shareRecipients: [DataLakePrincipal]?

        @inlinable
        public init(applicationArn: String? = nil, catalogId: String? = nil, externalFiltering: ExternalFilteringConfiguration? = nil, instanceArn: String? = nil, resourceShare: String? = nil, shareRecipients: [DataLakePrincipal]? = nil) {
            self.applicationArn = applicationArn
            self.catalogId = catalogId
            self.externalFiltering = externalFiltering
            self.instanceArn = instanceArn
            self.resourceShare = resourceShare
            self.shareRecipients = shareRecipients
        }

        private enum CodingKeys: String, CodingKey {
            case applicationArn = "ApplicationArn"
            case catalogId = "CatalogId"
            case externalFiltering = "ExternalFiltering"
            case instanceArn = "InstanceArn"
            case resourceShare = "ResourceShare"
            case shareRecipients = "ShareRecipients"
        }
    }

    public struct DescribeResourceRequest: AWSEncodableShape {
        /// The resource ARN.
        public let resourceArn: String

        @inlinable
        public init(resourceArn: String) {
            self.resourceArn = resourceArn
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
        }
    }

    public struct DescribeResourceResponse: AWSDecodableShape {
        /// A structure containing information about an Lake Formation resource.
        public let resourceInfo: ResourceInfo?

        @inlinable
        public init(resourceInfo: ResourceInfo? = nil) {
            self.resourceInfo = resourceInfo
        }

        private enum CodingKeys: String, CodingKey {
            case resourceInfo = "ResourceInfo"
        }
    }

    public struct DescribeTransactionRequest: AWSEncodableShape {
        /// The transaction for which to return status.
        public let transactionId: String

        @inlinable
        public init(transactionId: String) {
            self.transactionId = transactionId
        }

        public func validate(name: String) throws {
            try self.validate(self.transactionId, name: "transactionId", parent: name, max: 255)
            try self.validate(self.transactionId, name: "transactionId", parent: name, min: 1)
            try self.validate(self.transactionId, name: "transactionId", parent: name, pattern: "^[\\p{L}\\p{N}\\p{P}]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case transactionId = "TransactionId"
        }
    }

    public struct DescribeTransactionResponse: AWSDecodableShape {
        /// Returns a TransactionDescription object containing information about the transaction.
        public let transactionDescription: TransactionDescription?

        @inlinable
        public init(transactionDescription: TransactionDescription? = nil) {
            self.transactionDescription = transactionDescription
        }

        private enum CodingKeys: String, CodingKey {
            case transactionDescription = "TransactionDescription"
        }
    }

    public struct DetailsMap: AWSDecodableShape {
        /// A resource share ARN for a catalog resource shared through RAM.
        public let resourceShare: [String]?

        @inlinable
        public init(resourceShare: [String]? = nil) {
            self.resourceShare = resourceShare
        }

        private enum CodingKeys: String, CodingKey {
            case resourceShare = "ResourceShare"
        }
    }

    public struct ErrorDetail: AWSDecodableShape {
        /// The code associated with this error.
        public let errorCode: String?
        /// A message describing the error.
        public let errorMessage: String?

        @inlinable
        public init(errorCode: String? = nil, errorMessage: String? = nil) {
            self.errorCode = errorCode
            self.errorMessage = errorMessage
        }

        private enum CodingKeys: String, CodingKey {
            case errorCode = "ErrorCode"
            case errorMessage = "ErrorMessage"
        }
    }

    public struct ExecutionStatistics: AWSDecodableShape {
        /// The average time the request took to be executed.
        public let averageExecutionTimeMillis: Int64?
        /// The amount of data that was scanned in bytes.
        public let dataScannedBytes: Int64?
        /// The number of work units executed.
        public let workUnitsExecutedCount: Int64?

        @inlinable
        public init(averageExecutionTimeMillis: Int64? = nil, dataScannedBytes: Int64? = nil, workUnitsExecutedCount: Int64? = nil) {
            self.averageExecutionTimeMillis = averageExecutionTimeMillis
            self.dataScannedBytes = dataScannedBytes
            self.workUnitsExecutedCount = workUnitsExecutedCount
        }

        private enum CodingKeys: String, CodingKey {
            case averageExecutionTimeMillis = "AverageExecutionTimeMillis"
            case dataScannedBytes = "DataScannedBytes"
            case workUnitsExecutedCount = "WorkUnitsExecutedCount"
        }
    }

    public struct ExtendTransactionRequest: AWSEncodableShape {
        /// The transaction to extend.
        public let transactionId: String?

        @inlinable
        public init(transactionId: String? = nil) {
            self.transactionId = transactionId
        }

        public func validate(name: String) throws {
            try self.validate(self.transactionId, name: "transactionId", parent: name, max: 255)
            try self.validate(self.transactionId, name: "transactionId", parent: name, min: 1)
            try self.validate(self.transactionId, name: "transactionId", parent: name, pattern: "^[\\p{L}\\p{N}\\p{P}]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case transactionId = "TransactionId"
        }
    }

    public struct ExtendTransactionResponse: AWSDecodableShape {
        public init() {}
    }

    public struct ExternalFilteringConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// List of third-party application ARNs integrated with Lake Formation.
        public let authorizedTargets: [String]
        /// Allows to enable or disable the third-party applications that are allowed to access data managed by Lake Formation.
        public let status: EnableStatus

        @inlinable
        public init(authorizedTargets: [String], status: EnableStatus) {
            self.authorizedTargets = authorizedTargets
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case authorizedTargets = "AuthorizedTargets"
            case status = "Status"
        }
    }

    public struct FilterCondition: AWSEncodableShape {
        /// The comparison operator used in the filter condition.
        public let comparisonOperator: ComparisonOperator?
        /// The field to filter in the filter condition.
        public let field: FieldNameString?
        /// A string with values used in evaluating the filter condition.
        public let stringValueList: [String]?

        @inlinable
        public init(comparisonOperator: ComparisonOperator? = nil, field: FieldNameString? = nil, stringValueList: [String]? = nil) {
            self.comparisonOperator = comparisonOperator
            self.field = field
            self.stringValueList = stringValueList
        }

        private enum CodingKeys: String, CodingKey {
            case comparisonOperator = "ComparisonOperator"
            case field = "Field"
            case stringValueList = "StringValueList"
        }
    }

    public struct GetDataCellsFilterRequest: AWSEncodableShape {
        /// A database in the Glue Data Catalog.
        public let databaseName: String
        /// The name given by the user to the data filter cell.
        public let name: String
        /// The ID of the catalog to which the table belongs.
        public let tableCatalogId: String
        /// A table in the database.
        public let tableName: String

        @inlinable
        public init(databaseName: String, name: String, tableCatalogId: String, tableName: String) {
            self.databaseName = databaseName
            self.name = name
            self.tableCatalogId = tableCatalogId
            self.tableName = tableName
        }

        public func validate(name: String) throws {
            try self.validate(self.databaseName, name: "databaseName", parent: name, max: 255)
            try self.validate(self.databaseName, name: "databaseName", parent: name, min: 1)
            try self.validate(self.databaseName, name: "databaseName", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.name, name: "name", parent: name, max: 255)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.tableCatalogId, name: "tableCatalogId", parent: name, max: 255)
            try self.validate(self.tableCatalogId, name: "tableCatalogId", parent: name, min: 1)
            try self.validate(self.tableCatalogId, name: "tableCatalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.tableName, name: "tableName", parent: name, max: 255)
            try self.validate(self.tableName, name: "tableName", parent: name, min: 1)
            try self.validate(self.tableName, name: "tableName", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case databaseName = "DatabaseName"
            case name = "Name"
            case tableCatalogId = "TableCatalogId"
            case tableName = "TableName"
        }
    }

    public struct GetDataCellsFilterResponse: AWSDecodableShape {
        /// A structure that describes certain columns on certain rows.
        public let dataCellsFilter: DataCellsFilter?

        @inlinable
        public init(dataCellsFilter: DataCellsFilter? = nil) {
            self.dataCellsFilter = dataCellsFilter
        }

        private enum CodingKeys: String, CodingKey {
            case dataCellsFilter = "DataCellsFilter"
        }
    }

    public struct GetDataLakePrincipalRequest: AWSEncodableShape {
        public init() {}
    }

    public struct GetDataLakePrincipalResponse: AWSDecodableShape {
        /// A unique identifier of the invoking principal.
        public let identity: String?

        @inlinable
        public init(identity: String? = nil) {
            self.identity = identity
        }

        private enum CodingKeys: String, CodingKey {
            case identity = "Identity"
        }
    }

    public struct GetDataLakeSettingsRequest: AWSEncodableShape {
        /// The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment.
        public let catalogId: String?

        @inlinable
        public init(catalogId: String? = nil) {
            self.catalogId = catalogId
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
        }
    }

    public struct GetDataLakeSettingsResponse: AWSDecodableShape {
        /// A structure representing a list of Lake Formation principals designated as data lake administrators.
        public let dataLakeSettings: DataLakeSettings?

        @inlinable
        public init(dataLakeSettings: DataLakeSettings? = nil) {
            self.dataLakeSettings = dataLakeSettings
        }

        private enum CodingKeys: String, CodingKey {
            case dataLakeSettings = "DataLakeSettings"
        }
    }

    public struct GetEffectivePermissionsForPathRequest: AWSEncodableShape {
        /// The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment.
        public let catalogId: String?
        /// The maximum number of results to return.
        public let maxResults: Int?
        /// A continuation token, if this is not the first call to retrieve this list.
        public let nextToken: String?
        /// The Amazon Resource Name (ARN) of the resource for which you want to get permissions.
        public let resourceArn: String

        @inlinable
        public init(catalogId: String? = nil, maxResults: Int? = nil, nextToken: String? = nil, resourceArn: String) {
            self.catalogId = catalogId
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case resourceArn = "ResourceArn"
        }
    }

    public struct GetEffectivePermissionsForPathResponse: AWSDecodableShape {
        /// A continuation token, if this is not the first call to retrieve this list.
        public let nextToken: String?
        /// A list of the permissions for the specified table or database resource located at the path in Amazon S3.
        public let permissions: [PrincipalResourcePermissions]?

        @inlinable
        public init(nextToken: String? = nil, permissions: [PrincipalResourcePermissions]? = nil) {
            self.nextToken = nextToken
            self.permissions = permissions
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case permissions = "Permissions"
        }
    }

    public struct GetLFTagExpressionRequest: AWSEncodableShape {
        /// The identifier for the Data Catalog. By default, the account ID.
        public let catalogId: String?
        /// The name for the LF-Tag expression
        public let name: String

        @inlinable
        public init(catalogId: String? = nil, name: String) {
            self.catalogId = catalogId
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.name, name: "name", parent: name, max: 255)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case name = "Name"
        }
    }

    public struct GetLFTagExpressionResponse: AWSDecodableShape {
        /// The identifier for the Data Catalog. By default, the account ID in which the LF-Tag expression is saved.
        public let catalogId: String?
        /// The description with information about the LF-Tag expression.
        public let description: String?
        /// The body of the LF-Tag expression. It is composed of one or more LF-Tag key-value pairs.
        public let expression: [LFTag]?
        /// The name for the LF-Tag expression.
        public let name: String?

        @inlinable
        public init(catalogId: String? = nil, description: String? = nil, expression: [LFTag]? = nil, name: String? = nil) {
            self.catalogId = catalogId
            self.description = description
            self.expression = expression
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case description = "Description"
            case expression = "Expression"
            case name = "Name"
        }
    }

    public struct GetLFTagRequest: AWSEncodableShape {
        /// The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment.
        public let catalogId: String?
        /// The key-name for the LF-tag.
        public let tagKey: String

        @inlinable
        public init(catalogId: String? = nil, tagKey: String) {
            self.catalogId = catalogId
            self.tagKey = tagKey
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.tagKey, name: "tagKey", parent: name, max: 128)
            try self.validate(self.tagKey, name: "tagKey", parent: name, min: 1)
            try self.validate(self.tagKey, name: "tagKey", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:\\/=+\\-@%]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case tagKey = "TagKey"
        }
    }

    public struct GetLFTagResponse: AWSDecodableShape {
        /// The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment.
        public let catalogId: String?
        /// The key-name for the LF-tag.
        public let tagKey: String?
        /// A list of possible values an attribute can take.
        public let tagValues: [String]?

        @inlinable
        public init(catalogId: String? = nil, tagKey: String? = nil, tagValues: [String]? = nil) {
            self.catalogId = catalogId
            self.tagKey = tagKey
            self.tagValues = tagValues
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case tagKey = "TagKey"
            case tagValues = "TagValues"
        }
    }

    public struct GetQueryStateRequest: AWSEncodableShape {
        /// The ID of the plan query operation.
        public let queryId: String

        @inlinable
        public init(queryId: String) {
            self.queryId = queryId
        }

        public func validate(name: String) throws {
            try self.validate(self.queryId, name: "queryId", parent: name, max: 36)
            try self.validate(self.queryId, name: "queryId", parent: name, min: 36)
        }

        private enum CodingKeys: String, CodingKey {
            case queryId = "QueryId"
        }
    }

    public struct GetQueryStateResponse: AWSDecodableShape {
        /// An error message when the operation fails.
        public let error: String?
        /// The state of a query previously submitted. The possible states are:   PENDING: the query is pending.   WORKUNITS_AVAILABLE: some work units are ready for retrieval and execution.   FINISHED: the query planning finished successfully, and all work units are ready for retrieval and execution.   ERROR: an error occurred with the query, such as an invalid query ID or a backend error.
        public let state: QueryStateString

        @inlinable
        public init(error: String? = nil, state: QueryStateString) {
            self.error = error
            self.state = state
        }

        private enum CodingKeys: String, CodingKey {
            case error = "Error"
            case state = "State"
        }
    }

    public struct GetQueryStatisticsRequest: AWSEncodableShape {
        /// The ID of the plan query operation.
        public let queryId: String

        @inlinable
        public init(queryId: String) {
            self.queryId = queryId
        }

        public func validate(name: String) throws {
            try self.validate(self.queryId, name: "queryId", parent: name, max: 36)
            try self.validate(self.queryId, name: "queryId", parent: name, min: 36)
        }

        private enum CodingKeys: String, CodingKey {
            case queryId = "QueryId"
        }
    }

    public struct GetQueryStatisticsResponse: AWSDecodableShape {
        /// An ExecutionStatistics structure containing execution statistics.
        public let executionStatistics: ExecutionStatistics?
        /// A PlanningStatistics structure containing query planning statistics.
        public let planningStatistics: PlanningStatistics?
        /// The time that the query was submitted.
        @OptionalCustomCoding<ISO8601DateCoder>
        public var querySubmissionTime: Date?

        @inlinable
        public init(executionStatistics: ExecutionStatistics? = nil, planningStatistics: PlanningStatistics? = nil, querySubmissionTime: Date? = nil) {
            self.executionStatistics = executionStatistics
            self.planningStatistics = planningStatistics
            self.querySubmissionTime = querySubmissionTime
        }

        private enum CodingKeys: String, CodingKey {
            case executionStatistics = "ExecutionStatistics"
            case planningStatistics = "PlanningStatistics"
            case querySubmissionTime = "QuerySubmissionTime"
        }
    }

    public struct GetResourceLFTagsRequest: AWSEncodableShape {
        /// The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment.
        public let catalogId: String?
        /// The database, table, or column resource for which you want to return LF-tags.
        public let resource: Resource
        /// Indicates whether to show the assigned LF-tags.
        public let showAssignedLFTags: Bool?

        @inlinable
        public init(catalogId: String? = nil, resource: Resource, showAssignedLFTags: Bool? = nil) {
            self.catalogId = catalogId
            self.resource = resource
            self.showAssignedLFTags = showAssignedLFTags
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.resource.validate(name: "\(name).resource")
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case resource = "Resource"
            case showAssignedLFTags = "ShowAssignedLFTags"
        }
    }

    public struct GetResourceLFTagsResponse: AWSDecodableShape {
        /// A list of LF-tags applied to a database resource.
        public let lfTagOnDatabase: [LFTagPair]?
        /// A list of LF-tags applied to a column resource.
        public let lfTagsOnColumns: [ColumnLFTag]?
        /// A list of LF-tags applied to a table resource.
        public let lfTagsOnTable: [LFTagPair]?

        @inlinable
        public init(lfTagOnDatabase: [LFTagPair]? = nil, lfTagsOnColumns: [ColumnLFTag]? = nil, lfTagsOnTable: [LFTagPair]? = nil) {
            self.lfTagOnDatabase = lfTagOnDatabase
            self.lfTagsOnColumns = lfTagsOnColumns
            self.lfTagsOnTable = lfTagsOnTable
        }

        private enum CodingKeys: String, CodingKey {
            case lfTagOnDatabase = "LFTagOnDatabase"
            case lfTagsOnColumns = "LFTagsOnColumns"
            case lfTagsOnTable = "LFTagsOnTable"
        }
    }

    public struct GetTableObjectsRequest: AWSEncodableShape {
        /// The catalog containing the governed table. Defaults to the caller’s account.
        public let catalogId: String?
        /// The database containing the governed table.
        public let databaseName: String
        /// Specifies how many values to return in a page.
        public let maxResults: Int?
        /// A continuation token if this is not the first call to retrieve these objects.
        public let nextToken: String?
        /// A predicate to filter the objects returned based on the partition keys defined in the governed table.   The comparison operators supported are: =, >, =,    The logical operators supported are: AND   The data types supported are integer, long, date(yyyy-MM-dd), timestamp(yyyy-MM-dd HH:mm:ssXXX or yyyy-MM-dd HH:mm:ss"), string and decimal.
        public let partitionPredicate: String?
        /// The time as of when to read the governed table contents. If not set, the most recent transaction commit time is used. Cannot be specified along with TransactionId.
        public let queryAsOfTime: Date?
        /// The governed table for which to retrieve objects.
        public let tableName: String
        /// The transaction ID at which to read the governed table contents. If this transaction has aborted, an error is returned. If not set, defaults to the most recent committed transaction. Cannot be specified along with QueryAsOfTime.
        public let transactionId: String?

        @inlinable
        public init(catalogId: String? = nil, databaseName: String, maxResults: Int? = nil, nextToken: String? = nil, partitionPredicate: String? = nil, queryAsOfTime: Date? = nil, tableName: String, transactionId: String? = nil) {
            self.catalogId = catalogId
            self.databaseName = databaseName
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.partitionPredicate = partitionPredicate
            self.queryAsOfTime = queryAsOfTime
            self.tableName = tableName
            self.transactionId = transactionId
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.databaseName, name: "databaseName", parent: name, max: 255)
            try self.validate(self.databaseName, name: "databaseName", parent: name, min: 1)
            try self.validate(self.databaseName, name: "databaseName", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 4096)
            try self.validate(self.partitionPredicate, name: "partitionPredicate", parent: name, max: 2048)
            try self.validate(self.partitionPredicate, name: "partitionPredicate", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.validate(self.tableName, name: "tableName", parent: name, max: 255)
            try self.validate(self.tableName, name: "tableName", parent: name, min: 1)
            try self.validate(self.tableName, name: "tableName", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.transactionId, name: "transactionId", parent: name, max: 255)
            try self.validate(self.transactionId, name: "transactionId", parent: name, min: 1)
            try self.validate(self.transactionId, name: "transactionId", parent: name, pattern: "^[\\p{L}\\p{N}\\p{P}]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case databaseName = "DatabaseName"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case partitionPredicate = "PartitionPredicate"
            case queryAsOfTime = "QueryAsOfTime"
            case tableName = "TableName"
            case transactionId = "TransactionId"
        }
    }

    public struct GetTableObjectsResponse: AWSDecodableShape {
        /// A continuation token indicating whether additional data is available.
        public let nextToken: String?
        /// A list of objects organized by partition keys.
        public let objects: [PartitionObjects]?

        @inlinable
        public init(nextToken: String? = nil, objects: [PartitionObjects]? = nil) {
            self.nextToken = nextToken
            self.objects = objects
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case objects = "Objects"
        }
    }

    public struct GetTemporaryGluePartitionCredentialsRequest: AWSEncodableShape {
        /// A structure representing context to access a resource (column names, query ID, etc).
        public let auditContext: AuditContext?
        /// The time period, between 900 and 21,600 seconds, for the timeout of the temporary credentials.
        public let durationSeconds: Int?
        /// A list of partition values identifying a single partition.
        public let partition: PartitionValueList
        /// Filters the request based on the user having been granted a list of specified permissions on the requested resource(s).
        public let permissions: [Permission]?
        /// A list of supported permission types for the partition. Valid values are COLUMN_PERMISSION and CELL_FILTER_PERMISSION.
        public let supportedPermissionTypes: [PermissionType]?
        /// The ARN of the partitions' table.
        public let tableArn: String

        @inlinable
        public init(auditContext: AuditContext? = nil, durationSeconds: Int? = nil, partition: PartitionValueList, permissions: [Permission]? = nil, supportedPermissionTypes: [PermissionType]? = nil, tableArn: String) {
            self.auditContext = auditContext
            self.durationSeconds = durationSeconds
            self.partition = partition
            self.permissions = permissions
            self.supportedPermissionTypes = supportedPermissionTypes
            self.tableArn = tableArn
        }

        public func validate(name: String) throws {
            try self.auditContext?.validate(name: "\(name).auditContext")
            try self.validate(self.durationSeconds, name: "durationSeconds", parent: name, max: 43200)
            try self.validate(self.durationSeconds, name: "durationSeconds", parent: name, min: 900)
            try self.partition.validate(name: "\(name).partition")
            try self.validate(self.supportedPermissionTypes, name: "supportedPermissionTypes", parent: name, max: 255)
            try self.validate(self.supportedPermissionTypes, name: "supportedPermissionTypes", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case auditContext = "AuditContext"
            case durationSeconds = "DurationSeconds"
            case partition = "Partition"
            case permissions = "Permissions"
            case supportedPermissionTypes = "SupportedPermissionTypes"
            case tableArn = "TableArn"
        }
    }

    public struct GetTemporaryGluePartitionCredentialsResponse: AWSDecodableShape {
        /// The access key ID for the temporary credentials.
        public let accessKeyId: String?
        /// The date and time when the temporary credentials expire.
        public let expiration: Date?
        /// The secret key for the temporary credentials.
        public let secretAccessKey: String?
        /// The session token for the temporary credentials.
        public let sessionToken: String?

        @inlinable
        public init(accessKeyId: String? = nil, expiration: Date? = nil, secretAccessKey: String? = nil, sessionToken: String? = nil) {
            self.accessKeyId = accessKeyId
            self.expiration = expiration
            self.secretAccessKey = secretAccessKey
            self.sessionToken = sessionToken
        }

        private enum CodingKeys: String, CodingKey {
            case accessKeyId = "AccessKeyId"
            case expiration = "Expiration"
            case secretAccessKey = "SecretAccessKey"
            case sessionToken = "SessionToken"
        }
    }

    public struct GetTemporaryGlueTableCredentialsRequest: AWSEncodableShape {
        /// A structure representing context to access a resource (column names, query ID, etc).
        public let auditContext: AuditContext?
        /// The time period, between 900 and 21,600 seconds, for the timeout of the temporary credentials.
        public let durationSeconds: Int?
        /// Filters the request based on the user having been granted a list of specified permissions on the requested resource(s).
        public let permissions: [Permission]?
        /// A structure used as a protocol between query engines and Lake Formation or Glue. Contains both a Lake Formation generated authorization identifier and information from the request's authorization context.
        public let querySessionContext: QuerySessionContext?
        /// The Amazon S3 path for the table.
        public let s3Path: String?
        /// A list of supported permission types for the table. Valid values are COLUMN_PERMISSION and CELL_FILTER_PERMISSION.
        public let supportedPermissionTypes: [PermissionType]?
        /// The ARN identifying a table in the Data Catalog for the temporary credentials request.
        public let tableArn: String

        @inlinable
        public init(auditContext: AuditContext? = nil, durationSeconds: Int? = nil, permissions: [Permission]? = nil, querySessionContext: QuerySessionContext? = nil, s3Path: String? = nil, supportedPermissionTypes: [PermissionType]? = nil, tableArn: String) {
            self.auditContext = auditContext
            self.durationSeconds = durationSeconds
            self.permissions = permissions
            self.querySessionContext = querySessionContext
            self.s3Path = s3Path
            self.supportedPermissionTypes = supportedPermissionTypes
            self.tableArn = tableArn
        }

        public func validate(name: String) throws {
            try self.auditContext?.validate(name: "\(name).auditContext")
            try self.validate(self.durationSeconds, name: "durationSeconds", parent: name, max: 43200)
            try self.validate(self.durationSeconds, name: "durationSeconds", parent: name, min: 900)
            try self.querySessionContext?.validate(name: "\(name).querySessionContext")
            try self.validate(self.supportedPermissionTypes, name: "supportedPermissionTypes", parent: name, max: 255)
            try self.validate(self.supportedPermissionTypes, name: "supportedPermissionTypes", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case auditContext = "AuditContext"
            case durationSeconds = "DurationSeconds"
            case permissions = "Permissions"
            case querySessionContext = "QuerySessionContext"
            case s3Path = "S3Path"
            case supportedPermissionTypes = "SupportedPermissionTypes"
            case tableArn = "TableArn"
        }
    }

    public struct GetTemporaryGlueTableCredentialsResponse: AWSDecodableShape {
        /// The access key ID for the temporary credentials.
        public let accessKeyId: String?
        /// The date and time when the temporary credentials expire.
        public let expiration: Date?
        /// The secret key for the temporary credentials.
        public let secretAccessKey: String?
        /// The session token for the temporary credentials.
        public let sessionToken: String?
        /// The Amazon S3 path for the temporary credentials.
        public let vendedS3Path: [String]?

        @inlinable
        public init(accessKeyId: String? = nil, expiration: Date? = nil, secretAccessKey: String? = nil, sessionToken: String? = nil, vendedS3Path: [String]? = nil) {
            self.accessKeyId = accessKeyId
            self.expiration = expiration
            self.secretAccessKey = secretAccessKey
            self.sessionToken = sessionToken
            self.vendedS3Path = vendedS3Path
        }

        private enum CodingKeys: String, CodingKey {
            case accessKeyId = "AccessKeyId"
            case expiration = "Expiration"
            case secretAccessKey = "SecretAccessKey"
            case sessionToken = "SessionToken"
            case vendedS3Path = "VendedS3Path"
        }
    }

    public struct GetWorkUnitResultsRequest: AWSEncodableShape {
        /// The ID of the plan query operation for which to get results.
        public let queryId: String
        /// The work unit ID for which to get results. Value generated by enumerating WorkUnitIdMin to WorkUnitIdMax (inclusive) from the WorkUnitRange in the output of GetWorkUnits.
        public let workUnitId: Int64
        /// A work token used to query the execution service. Token output from GetWorkUnits.
        public let workUnitToken: String

        @inlinable
        public init(queryId: String, workUnitId: Int64 = 0, workUnitToken: String) {
            self.queryId = queryId
            self.workUnitId = workUnitId
            self.workUnitToken = workUnitToken
        }

        public func validate(name: String) throws {
            try self.validate(self.queryId, name: "queryId", parent: name, max: 36)
            try self.validate(self.queryId, name: "queryId", parent: name, min: 36)
            try self.validate(self.workUnitId, name: "workUnitId", parent: name, min: 0)
            try self.validate(self.workUnitToken, name: "workUnitToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case queryId = "QueryId"
            case workUnitId = "WorkUnitId"
            case workUnitToken = "WorkUnitToken"
        }
    }

    public struct GetWorkUnitResultsResponse: AWSDecodableShape {
        public static let _options: AWSShapeOptions = [.rawPayload]
        /// Rows returned from the GetWorkUnitResults operation as a stream of Apache Arrow v1.0 messages.
        public let resultStream: AWSHTTPBody

        @inlinable
        public init(resultStream: AWSHTTPBody) {
            self.resultStream = resultStream
        }

        public init(from decoder: Decoder) throws {
            let container = try decoder.singleValueContainer()
            self.resultStream = try container.decode(AWSHTTPBody.self)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetWorkUnitsRequest: AWSEncodableShape {
        /// A continuation token, if this is a continuation call.
        public let nextToken: String?
        /// The size of each page to get in the Amazon Web Services service call. This does not affect the number of items returned in the command's output. Setting a smaller page size results in more calls to the Amazon Web Services service, retrieving fewer items in each call. This can help prevent the Amazon Web Services service calls from timing out.
        public let pageSize: Int?
        /// The ID of the plan query operation.
        public let queryId: String

        @inlinable
        public init(nextToken: String? = nil, pageSize: Int? = nil, queryId: String) {
            self.nextToken = nextToken
            self.pageSize = pageSize
            self.queryId = queryId
        }

        public func validate(name: String) throws {
            try self.validate(self.queryId, name: "queryId", parent: name, max: 36)
            try self.validate(self.queryId, name: "queryId", parent: name, min: 36)
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case pageSize = "PageSize"
            case queryId = "QueryId"
        }
    }

    public struct GetWorkUnitsResponse: AWSDecodableShape {
        /// A continuation token for paginating the returned list of tokens, returned if the current segment of the list is not the last.
        public let nextToken: String?
        /// The ID of the plan query operation.
        public let queryId: String
        /// A WorkUnitRangeList object that specifies the valid range of work unit IDs for querying the execution service.
        public let workUnitRanges: [WorkUnitRange]

        @inlinable
        public init(nextToken: String? = nil, queryId: String, workUnitRanges: [WorkUnitRange]) {
            self.nextToken = nextToken
            self.queryId = queryId
            self.workUnitRanges = workUnitRanges
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case queryId = "QueryId"
            case workUnitRanges = "WorkUnitRanges"
        }
    }

    public struct GrantPermissionsRequest: AWSEncodableShape {
        /// The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment.
        public let catalogId: String?
        public let condition: Condition?
        /// The permissions granted to the principal on the resource. Lake Formation defines privileges to grant and revoke access to metadata in the Data Catalog and data organized in underlying data storage such as Amazon S3. Lake Formation requires that each principal be authorized to perform a specific task on Lake Formation resources.
        public let permissions: [Permission]
        /// Indicates a list of the granted permissions that the principal may pass to other users. These permissions may only be a subset of the permissions granted in the Privileges.
        public let permissionsWithGrantOption: [Permission]?
        /// The principal to be granted the permissions on the resource. Supported principals are IAM users or IAM roles, and they are defined by their principal type and their ARN. Note that if you define a resource with a particular ARN, then later delete, and recreate a resource with that same ARN, the resource maintains the permissions already granted.
        public let principal: DataLakePrincipal
        /// The resource to which permissions are to be granted. Resources in Lake Formation are the Data Catalog, databases, and tables.
        public let resource: Resource

        @inlinable
        public init(catalogId: String? = nil, condition: Condition? = nil, permissions: [Permission], permissionsWithGrantOption: [Permission]? = nil, principal: DataLakePrincipal, resource: Resource) {
            self.catalogId = catalogId
            self.condition = condition
            self.permissions = permissions
            self.permissionsWithGrantOption = permissionsWithGrantOption
            self.principal = principal
            self.resource = resource
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.condition?.validate(name: "\(name).condition")
            try self.principal.validate(name: "\(name).principal")
            try self.resource.validate(name: "\(name).resource")
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case condition = "Condition"
            case permissions = "Permissions"
            case permissionsWithGrantOption = "PermissionsWithGrantOption"
            case principal = "Principal"
            case resource = "Resource"
        }
    }

    public struct GrantPermissionsResponse: AWSDecodableShape {
        public init() {}
    }

    public struct LFTag: AWSEncodableShape & AWSDecodableShape {
        /// The key-name for the LF-tag.
        public let tagKey: String
        /// A list of possible values an attribute can take. The maximum number of values that can be defined for a LF-Tag is 1000. A single API call supports 50 values. You can use multiple API calls to add more values.
        public let tagValues: [String]

        @inlinable
        public init(tagKey: String, tagValues: [String]) {
            self.tagKey = tagKey
            self.tagValues = tagValues
        }

        public func validate(name: String) throws {
            try self.validate(self.tagKey, name: "tagKey", parent: name, max: 128)
            try self.validate(self.tagKey, name: "tagKey", parent: name, min: 1)
            try self.validate(self.tagKey, name: "tagKey", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:\\/=+\\-@%]*)$")
            try self.tagValues.forEach {
                try validate($0, name: "tagValues[]", parent: name, max: 256)
                try validate($0, name: "tagValues[]", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:\\*\\/=+\\-@%]*)$")
            }
            try self.validate(self.tagValues, name: "tagValues", parent: name, max: 50)
            try self.validate(self.tagValues, name: "tagValues", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case tagKey = "TagKey"
            case tagValues = "TagValues"
        }
    }

    public struct LFTagError: AWSDecodableShape {
        /// An error that occurred with the attachment or detachment of the LF-tag.
        public let error: ErrorDetail?
        /// The key-name of the LF-tag.
        public let lfTag: LFTagPair?

        @inlinable
        public init(error: ErrorDetail? = nil, lfTag: LFTagPair? = nil) {
            self.error = error
            self.lfTag = lfTag
        }

        private enum CodingKeys: String, CodingKey {
            case error = "Error"
            case lfTag = "LFTag"
        }
    }

    public struct LFTagExpression: AWSDecodableShape {
        /// The identifier for the Data Catalog. By default, the account ID.
        public let catalogId: String?
        /// A structure that contains information about the LF-Tag expression.
        public let description: String?
        /// A logical expression composed of one or more LF-Tags.
        public let expression: [LFTag]?
        /// The name for saved the LF-Tag expression.
        public let name: String?

        @inlinable
        public init(catalogId: String? = nil, description: String? = nil, expression: [LFTag]? = nil, name: String? = nil) {
            self.catalogId = catalogId
            self.description = description
            self.expression = expression
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case description = "Description"
            case expression = "Expression"
            case name = "Name"
        }
    }

    public struct LFTagExpressionResource: AWSEncodableShape & AWSDecodableShape {
        /// The identifier for the Data Catalog. By default, the account ID.
        public let catalogId: String?
        /// The name of the LF-Tag expression to grant permissions on.
        public let name: String

        @inlinable
        public init(catalogId: String? = nil, name: String) {
            self.catalogId = catalogId
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.name, name: "name", parent: name, max: 255)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case name = "Name"
        }
    }

    public struct LFTagKeyResource: AWSEncodableShape & AWSDecodableShape {
        /// The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment.
        public let catalogId: String?
        /// The key-name for the LF-tag.
        public let tagKey: String
        /// A list of possible values an attribute can take.
        public let tagValues: [String]

        @inlinable
        public init(catalogId: String? = nil, tagKey: String, tagValues: [String]) {
            self.catalogId = catalogId
            self.tagKey = tagKey
            self.tagValues = tagValues
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.tagKey, name: "tagKey", parent: name, max: 255)
            try self.validate(self.tagKey, name: "tagKey", parent: name, min: 1)
            try self.validate(self.tagKey, name: "tagKey", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.tagValues.forEach {
                try validate($0, name: "tagValues[]", parent: name, max: 256)
                try validate($0, name: "tagValues[]", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:\\*\\/=+\\-@%]*)$")
            }
            try self.validate(self.tagValues, name: "tagValues", parent: name, max: 50)
            try self.validate(self.tagValues, name: "tagValues", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case tagKey = "TagKey"
            case tagValues = "TagValues"
        }
    }

    public struct LFTagPair: AWSEncodableShape & AWSDecodableShape {
        /// The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment.
        public let catalogId: String?
        /// The key-name for the LF-tag.
        public let tagKey: String
        /// A list of possible values an attribute can take.
        public let tagValues: [String]

        @inlinable
        public init(catalogId: String? = nil, tagKey: String, tagValues: [String]) {
            self.catalogId = catalogId
            self.tagKey = tagKey
            self.tagValues = tagValues
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.tagKey, name: "tagKey", parent: name, max: 128)
            try self.validate(self.tagKey, name: "tagKey", parent: name, min: 1)
            try self.validate(self.tagKey, name: "tagKey", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:\\/=+\\-@%]*)$")
            try self.tagValues.forEach {
                try validate($0, name: "tagValues[]", parent: name, max: 256)
                try validate($0, name: "tagValues[]", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:\\*\\/=+\\-@%]*)$")
            }
            try self.validate(self.tagValues, name: "tagValues", parent: name, max: 50)
            try self.validate(self.tagValues, name: "tagValues", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case tagKey = "TagKey"
            case tagValues = "TagValues"
        }
    }

    public struct LFTagPolicyResource: AWSEncodableShape & AWSDecodableShape {
        /// The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment.
        public let catalogId: String?
        /// A list of LF-tag conditions or a saved expression that apply to the resource's LF-tag policy.
        public let expression: [LFTag]?
        /// If provided, permissions are granted to the Data Catalog resources whose assigned LF-Tags match the expression body of the saved expression under the provided ExpressionName.
        public let expressionName: String?
        /// The resource type for which the LF-tag policy applies.
        public let resourceType: ResourceType

        @inlinable
        public init(catalogId: String? = nil, expression: [LFTag]? = nil, expressionName: String? = nil, resourceType: ResourceType) {
            self.catalogId = catalogId
            self.expression = expression
            self.expressionName = expressionName
            self.resourceType = resourceType
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.expression?.forEach {
                try $0.validate(name: "\(name).expression[]")
            }
            try self.validate(self.expressionName, name: "expressionName", parent: name, max: 255)
            try self.validate(self.expressionName, name: "expressionName", parent: name, min: 1)
            try self.validate(self.expressionName, name: "expressionName", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case expression = "Expression"
            case expressionName = "ExpressionName"
            case resourceType = "ResourceType"
        }
    }

    public struct LakeFormationOptInsInfo: AWSDecodableShape {
        /// A Lake Formation condition, which applies to permissions and opt-ins that contain an expression.
        public let condition: Condition?
        /// The last modified date and time of the record.
        public let lastModified: Date?
        /// The user who updated the record.
        public let lastUpdatedBy: String?
        public let principal: DataLakePrincipal?
        public let resource: Resource?

        @inlinable
        public init(condition: Condition? = nil, lastModified: Date? = nil, lastUpdatedBy: String? = nil, principal: DataLakePrincipal? = nil, resource: Resource? = nil) {
            self.condition = condition
            self.lastModified = lastModified
            self.lastUpdatedBy = lastUpdatedBy
            self.principal = principal
            self.resource = resource
        }

        private enum CodingKeys: String, CodingKey {
            case condition = "Condition"
            case lastModified = "LastModified"
            case lastUpdatedBy = "LastUpdatedBy"
            case principal = "Principal"
            case resource = "Resource"
        }
    }

    public struct ListDataCellsFilterRequest: AWSEncodableShape {
        /// The maximum size of the response.
        public let maxResults: Int?
        /// A continuation token, if this is a continuation call.
        public let nextToken: String?
        /// A table in the Glue Data Catalog.
        public let table: TableResource?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, table: TableResource? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.table = table
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.table?.validate(name: "\(name).table")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case table = "Table"
        }
    }

    public struct ListDataCellsFilterResponse: AWSDecodableShape {
        /// A list of DataCellFilter structures.
        public let dataCellsFilters: [DataCellsFilter]?
        /// A continuation token, if not all requested data cell filters have been returned.
        public let nextToken: String?

        @inlinable
        public init(dataCellsFilters: [DataCellsFilter]? = nil, nextToken: String? = nil) {
            self.dataCellsFilters = dataCellsFilters
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case dataCellsFilters = "DataCellsFilters"
            case nextToken = "NextToken"
        }
    }

    public struct ListLFTagExpressionsRequest: AWSEncodableShape {
        /// The identifier for the Data Catalog. By default, the account ID.
        public let catalogId: String?
        /// The maximum number of results to return.
        public let maxResults: Int?
        /// A continuation token, if this is not the first call to retrieve this list.
        public let nextToken: String?

        @inlinable
        public init(catalogId: String? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.catalogId = catalogId
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListLFTagExpressionsResponse: AWSDecodableShape {
        /// Logical expressions composed of one more LF-Tag key-value pairs.
        public let lfTagExpressions: [LFTagExpression]?
        /// A continuation token, if this is not the first call to retrieve this list.
        public let nextToken: String?

        @inlinable
        public init(lfTagExpressions: [LFTagExpression]? = nil, nextToken: String? = nil) {
            self.lfTagExpressions = lfTagExpressions
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case lfTagExpressions = "LFTagExpressions"
            case nextToken = "NextToken"
        }
    }

    public struct ListLFTagsRequest: AWSEncodableShape {
        /// The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment.
        public let catalogId: String?
        /// The maximum number of results to return.
        public let maxResults: Int?
        /// A continuation token, if this is not the first call to retrieve this list.
        public let nextToken: String?
        /// If resource share type is ALL, returns both in-account LF-tags and shared LF-tags that the requester has permission to view. If resource share type is FOREIGN, returns all share LF-tags that the requester can view. If no resource share type is passed, lists LF-tags in the given catalog ID that the requester has permission to view.
        public let resourceShareType: ResourceShareType?

        @inlinable
        public init(catalogId: String? = nil, maxResults: Int? = nil, nextToken: String? = nil, resourceShareType: ResourceShareType? = nil) {
            self.catalogId = catalogId
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.resourceShareType = resourceShareType
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case resourceShareType = "ResourceShareType"
        }
    }

    public struct ListLFTagsResponse: AWSDecodableShape {
        /// A list of LF-tags that the requested has permission to view.
        public let lfTags: [LFTagPair]?
        /// A continuation token, present if the current list segment is not the last.
        public let nextToken: String?

        @inlinable
        public init(lfTags: [LFTagPair]? = nil, nextToken: String? = nil) {
            self.lfTags = lfTags
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case lfTags = "LFTags"
            case nextToken = "NextToken"
        }
    }

    public struct ListLakeFormationOptInsRequest: AWSEncodableShape {
        /// The maximum number of results to return.
        public let maxResults: Int?
        /// A continuation token, if this is not the first call to retrieve this list.
        public let nextToken: String?
        public let principal: DataLakePrincipal?
        /// A structure for the resource.
        public let resource: Resource?

        @inlinable
        public init(maxResults: Int? = nil, nextToken: String? = nil, principal: DataLakePrincipal? = nil, resource: Resource? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.principal = principal
            self.resource = resource
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.principal?.validate(name: "\(name).principal")
            try self.resource?.validate(name: "\(name).resource")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case principal = "Principal"
            case resource = "Resource"
        }
    }

    public struct ListLakeFormationOptInsResponse: AWSDecodableShape {
        /// A list of principal-resource pairs that have Lake Formation permissins enforced.
        public let lakeFormationOptInsInfoList: [LakeFormationOptInsInfo]?
        /// A continuation token, if this is not the first call to retrieve this list.
        public let nextToken: String?

        @inlinable
        public init(lakeFormationOptInsInfoList: [LakeFormationOptInsInfo]? = nil, nextToken: String? = nil) {
            self.lakeFormationOptInsInfoList = lakeFormationOptInsInfoList
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case lakeFormationOptInsInfoList = "LakeFormationOptInsInfoList"
            case nextToken = "NextToken"
        }
    }

    public struct ListPermissionsRequest: AWSEncodableShape {
        /// The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment.
        public let catalogId: String?
        /// Indicates that related permissions should be included in the results.
        public let includeRelated: String?
        /// The maximum number of results to return.
        public let maxResults: Int?
        /// A continuation token, if this is not the first call to retrieve this list.
        public let nextToken: String?
        /// Specifies a principal to filter the permissions returned.
        public let principal: DataLakePrincipal?
        /// A resource where you will get a list of the principal permissions. This operation does not support getting privileges on a table with columns. Instead, call this operation on the table, and the operation returns the table and the table w columns.
        public let resource: Resource?
        /// Specifies a resource type to filter the permissions returned.
        public let resourceType: DataLakeResourceType?

        @inlinable
        public init(catalogId: String? = nil, includeRelated: String? = nil, maxResults: Int? = nil, nextToken: String? = nil, principal: DataLakePrincipal? = nil, resource: Resource? = nil, resourceType: DataLakeResourceType? = nil) {
            self.catalogId = catalogId
            self.includeRelated = includeRelated
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.principal = principal
            self.resource = resource
            self.resourceType = resourceType
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.includeRelated, name: "includeRelated", parent: name, max: 5)
            try self.validate(self.includeRelated, name: "includeRelated", parent: name, min: 1)
            try self.validate(self.includeRelated, name: "includeRelated", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.principal?.validate(name: "\(name).principal")
            try self.resource?.validate(name: "\(name).resource")
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case includeRelated = "IncludeRelated"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case principal = "Principal"
            case resource = "Resource"
            case resourceType = "ResourceType"
        }
    }

    public struct ListPermissionsResponse: AWSDecodableShape {
        /// A continuation token, if this is not the first call to retrieve this list.
        public let nextToken: String?
        /// A list of principals and their permissions on the resource for the specified principal and resource types.
        public let principalResourcePermissions: [PrincipalResourcePermissions]?

        @inlinable
        public init(nextToken: String? = nil, principalResourcePermissions: [PrincipalResourcePermissions]? = nil) {
            self.nextToken = nextToken
            self.principalResourcePermissions = principalResourcePermissions
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case principalResourcePermissions = "PrincipalResourcePermissions"
        }
    }

    public struct ListResourcesRequest: AWSEncodableShape {
        /// Any applicable row-level and/or column-level filtering conditions for the resources.
        public let filterConditionList: [FilterCondition]?
        /// The maximum number of resource results.
        public let maxResults: Int?
        /// A continuation token, if this is not the first call to retrieve these resources.
        public let nextToken: String?

        @inlinable
        public init(filterConditionList: [FilterCondition]? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filterConditionList = filterConditionList
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.filterConditionList, name: "filterConditionList", parent: name, max: 20)
            try self.validate(self.filterConditionList, name: "filterConditionList", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filterConditionList = "FilterConditionList"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListResourcesResponse: AWSDecodableShape {
        /// A continuation token, if this is not the first call to retrieve these resources.
        public let nextToken: String?
        /// A summary of the data lake resources.
        public let resourceInfoList: [ResourceInfo]?

        @inlinable
        public init(nextToken: String? = nil, resourceInfoList: [ResourceInfo]? = nil) {
            self.nextToken = nextToken
            self.resourceInfoList = resourceInfoList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case resourceInfoList = "ResourceInfoList"
        }
    }

    public struct ListTableStorageOptimizersRequest: AWSEncodableShape {
        /// The Catalog ID of the table.
        public let catalogId: String?
        /// Name of the database where the table is present.
        public let databaseName: String
        /// The number of storage optimizers to return on each call.
        public let maxResults: Int?
        /// A continuation token, if this is a continuation call.
        public let nextToken: String?
        /// The specific type of storage optimizers to list. The supported value is compaction.
        public let storageOptimizerType: OptimizerType?
        /// Name of the table.
        public let tableName: String

        @inlinable
        public init(catalogId: String? = nil, databaseName: String, maxResults: Int? = nil, nextToken: String? = nil, storageOptimizerType: OptimizerType? = nil, tableName: String) {
            self.catalogId = catalogId
            self.databaseName = databaseName
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.storageOptimizerType = storageOptimizerType
            self.tableName = tableName
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.databaseName, name: "databaseName", parent: name, max: 255)
            try self.validate(self.databaseName, name: "databaseName", parent: name, min: 1)
            try self.validate(self.databaseName, name: "databaseName", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.tableName, name: "tableName", parent: name, max: 255)
            try self.validate(self.tableName, name: "tableName", parent: name, min: 1)
            try self.validate(self.tableName, name: "tableName", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case databaseName = "DatabaseName"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case storageOptimizerType = "StorageOptimizerType"
            case tableName = "TableName"
        }
    }

    public struct ListTableStorageOptimizersResponse: AWSDecodableShape {
        /// A continuation token for paginating the returned list of tokens, returned if the current segment of the list is not the last.
        public let nextToken: String?
        /// A list of the storage optimizers associated with a table.
        public let storageOptimizerList: [StorageOptimizer]?

        @inlinable
        public init(nextToken: String? = nil, storageOptimizerList: [StorageOptimizer]? = nil) {
            self.nextToken = nextToken
            self.storageOptimizerList = storageOptimizerList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case storageOptimizerList = "StorageOptimizerList"
        }
    }

    public struct ListTransactionsRequest: AWSEncodableShape {
        /// The catalog for which to list transactions. Defaults to the account ID of the caller.
        public let catalogId: String?
        /// The maximum number of transactions to return in a single call.
        public let maxResults: Int?
        /// A continuation token if this is not the first call to retrieve transactions.
        public let nextToken: String?
        ///  A filter indicating the status of transactions to return. Options are ALL | COMPLETED | COMMITTED | ABORTED | ACTIVE. The default is ALL.
        public let statusFilter: TransactionStatusFilter?

        @inlinable
        public init(catalogId: String? = nil, maxResults: Int? = nil, nextToken: String? = nil, statusFilter: TransactionStatusFilter? = nil) {
            self.catalogId = catalogId
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.statusFilter = statusFilter
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 4096)
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case statusFilter = "StatusFilter"
        }
    }

    public struct ListTransactionsResponse: AWSDecodableShape {
        /// A continuation token indicating whether additional data is available.
        public let nextToken: String?
        /// A list of transactions. The record for each transaction is a TransactionDescription object.
        public let transactions: [TransactionDescription]?

        @inlinable
        public init(nextToken: String? = nil, transactions: [TransactionDescription]? = nil) {
            self.nextToken = nextToken
            self.transactions = transactions
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case transactions = "Transactions"
        }
    }

    public struct PartitionObjects: AWSDecodableShape {
        /// A list of table objects
        public let objects: [TableObject]?
        /// A list of partition values.
        public let partitionValues: [String]?

        @inlinable
        public init(objects: [TableObject]? = nil, partitionValues: [String]? = nil) {
            self.objects = objects
            self.partitionValues = partitionValues
        }

        private enum CodingKeys: String, CodingKey {
            case objects = "Objects"
            case partitionValues = "PartitionValues"
        }
    }

    public struct PartitionValueList: AWSEncodableShape {
        /// The list of partition values.
        public let values: [String]

        @inlinable
        public init(values: [String]) {
            self.values = values
        }

        public func validate(name: String) throws {
            try self.validate(self.values, name: "values", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case values = "Values"
        }
    }

    public struct PlanningStatistics: AWSDecodableShape {
        /// An estimate of the data that was scanned in bytes.
        public let estimatedDataToScanBytes: Int64?
        /// The time that it took to process the request.
        public let planningTimeMillis: Int64?
        /// The time the request was in queue to be processed.
        public let queueTimeMillis: Int64?
        /// The number of work units generated.
        public let workUnitsGeneratedCount: Int64?

        @inlinable
        public init(estimatedDataToScanBytes: Int64? = nil, planningTimeMillis: Int64? = nil, queueTimeMillis: Int64? = nil, workUnitsGeneratedCount: Int64? = nil) {
            self.estimatedDataToScanBytes = estimatedDataToScanBytes
            self.planningTimeMillis = planningTimeMillis
            self.queueTimeMillis = queueTimeMillis
            self.workUnitsGeneratedCount = workUnitsGeneratedCount
        }

        private enum CodingKeys: String, CodingKey {
            case estimatedDataToScanBytes = "EstimatedDataToScanBytes"
            case planningTimeMillis = "PlanningTimeMillis"
            case queueTimeMillis = "QueueTimeMillis"
            case workUnitsGeneratedCount = "WorkUnitsGeneratedCount"
        }
    }

    public struct PrincipalPermissions: AWSEncodableShape & AWSDecodableShape {
        /// The permissions that are granted to the principal.
        public let permissions: [Permission]?
        /// The principal who is granted permissions.
        public let principal: DataLakePrincipal?

        @inlinable
        public init(permissions: [Permission]? = nil, principal: DataLakePrincipal? = nil) {
            self.permissions = permissions
            self.principal = principal
        }

        public func validate(name: String) throws {
            try self.principal?.validate(name: "\(name).principal")
        }

        private enum CodingKeys: String, CodingKey {
            case permissions = "Permissions"
            case principal = "Principal"
        }
    }

    public struct PrincipalResourcePermissions: AWSDecodableShape {
        /// This attribute can be used to return any additional details of PrincipalResourcePermissions. Currently returns only as a RAM resource share ARN.
        public let additionalDetails: DetailsMap?
        /// A Lake Formation condition, which applies to permissions and opt-ins that contain an expression.
        public let condition: Condition?
        /// The date and time when the resource was last updated.
        public let lastUpdated: Date?
        /// The user who updated the record.
        public let lastUpdatedBy: String?
        /// The permissions to be granted or revoked on the resource.
        public let permissions: [Permission]?
        /// Indicates whether to grant the ability to grant permissions (as a subset of permissions granted).
        public let permissionsWithGrantOption: [Permission]?
        /// The Data Lake principal to be granted or revoked permissions.
        public let principal: DataLakePrincipal?
        /// The resource where permissions are to be granted or revoked.
        public let resource: Resource?

        @inlinable
        public init(additionalDetails: DetailsMap? = nil, condition: Condition? = nil, lastUpdated: Date? = nil, lastUpdatedBy: String? = nil, permissions: [Permission]? = nil, permissionsWithGrantOption: [Permission]? = nil, principal: DataLakePrincipal? = nil, resource: Resource? = nil) {
            self.additionalDetails = additionalDetails
            self.condition = condition
            self.lastUpdated = lastUpdated
            self.lastUpdatedBy = lastUpdatedBy
            self.permissions = permissions
            self.permissionsWithGrantOption = permissionsWithGrantOption
            self.principal = principal
            self.resource = resource
        }

        private enum CodingKeys: String, CodingKey {
            case additionalDetails = "AdditionalDetails"
            case condition = "Condition"
            case lastUpdated = "LastUpdated"
            case lastUpdatedBy = "LastUpdatedBy"
            case permissions = "Permissions"
            case permissionsWithGrantOption = "PermissionsWithGrantOption"
            case principal = "Principal"
            case resource = "Resource"
        }
    }

    public struct PutDataLakeSettingsRequest: AWSEncodableShape {
        /// The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment.
        public let catalogId: String?
        /// A structure representing a list of Lake Formation principals designated as data lake administrators.
        public let dataLakeSettings: DataLakeSettings

        @inlinable
        public init(catalogId: String? = nil, dataLakeSettings: DataLakeSettings) {
            self.catalogId = catalogId
            self.dataLakeSettings = dataLakeSettings
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.dataLakeSettings.validate(name: "\(name).dataLakeSettings")
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case dataLakeSettings = "DataLakeSettings"
        }
    }

    public struct PutDataLakeSettingsResponse: AWSDecodableShape {
        public init() {}
    }

    public struct QueryPlanningContext: AWSEncodableShape {
        /// The ID of the Data Catalog where the partition in question resides. If none is provided, the Amazon Web Services account ID is used by default.
        public let catalogId: String?
        /// The database containing the table.
        public let databaseName: String
        /// The time as of when to read the table contents. If not set, the most recent transaction commit time will be used. Cannot be specified along with TransactionId.
        public let queryAsOfTime: Date?
        /// A map consisting of key-value pairs.
        public let queryParameters: [String: String]?
        /// The transaction ID at which to read the table contents. If this transaction is not committed, the read will be treated as part of that transaction and will see its writes. If this transaction has aborted, an error will be returned. If not set, defaults to the most recent committed transaction. Cannot be specified along with QueryAsOfTime.
        public let transactionId: String?

        @inlinable
        public init(catalogId: String? = nil, databaseName: String, queryAsOfTime: Date? = nil, queryParameters: [String: String]? = nil, transactionId: String? = nil) {
            self.catalogId = catalogId
            self.databaseName = databaseName
            self.queryAsOfTime = queryAsOfTime
            self.queryParameters = queryParameters
            self.transactionId = transactionId
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.databaseName, name: "databaseName", parent: name, min: 1)
            try self.validate(self.databaseName, name: "databaseName", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.transactionId, name: "transactionId", parent: name, max: 255)
            try self.validate(self.transactionId, name: "transactionId", parent: name, min: 1)
            try self.validate(self.transactionId, name: "transactionId", parent: name, pattern: "^[\\p{L}\\p{N}\\p{P}]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case databaseName = "DatabaseName"
            case queryAsOfTime = "QueryAsOfTime"
            case queryParameters = "QueryParameters"
            case transactionId = "TransactionId"
        }
    }

    public struct QuerySessionContext: AWSEncodableShape {
        /// An opaque string-string map passed by the query engine.
        public let additionalContext: [String: String]?
        /// An identifier string for the consumer cluster.
        public let clusterId: String?
        /// A cryptographically generated query identifier generated by Glue or Lake Formation.
        public let queryAuthorizationId: String?
        /// A unique identifier generated by the query engine for the query.
        public let queryId: String?
        /// A timestamp provided by the query engine for when the query started.
        public let queryStartTime: Date?

        @inlinable
        public init(additionalContext: [String: String]? = nil, clusterId: String? = nil, queryAuthorizationId: String? = nil, queryId: String? = nil, queryStartTime: Date? = nil) {
            self.additionalContext = additionalContext
            self.clusterId = clusterId
            self.queryAuthorizationId = queryAuthorizationId
            self.queryId = queryId
            self.queryStartTime = queryStartTime
        }

        public func validate(name: String) throws {
            try self.additionalContext?.forEach {
                try validate($0.key, name: "additionalContext.key", parent: name, max: 128)
                try validate($0.key, name: "additionalContext.key", parent: name, min: 1)
                try validate($0.value, name: "additionalContext[\"\($0.key)\"]", parent: name, max: 256)
            }
            try self.validate(self.queryAuthorizationId, name: "queryAuthorizationId", parent: name, max: 255)
            try self.validate(self.queryAuthorizationId, name: "queryAuthorizationId", parent: name, min: 1)
            try self.validate(self.queryAuthorizationId, name: "queryAuthorizationId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.queryId, name: "queryId", parent: name, max: 255)
            try self.validate(self.queryId, name: "queryId", parent: name, min: 1)
            try self.validate(self.queryId, name: "queryId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case additionalContext = "AdditionalContext"
            case clusterId = "ClusterId"
            case queryAuthorizationId = "QueryAuthorizationId"
            case queryId = "QueryId"
            case queryStartTime = "QueryStartTime"
        }
    }

    public struct RegisterResourceRequest: AWSEncodableShape {
        ///  Specifies whether the data access of tables pointing to the location can be managed by both Lake Formation permissions as well as Amazon S3 bucket policies.
        public let hybridAccessEnabled: Bool?
        /// The Amazon Resource Name (ARN) of the resource that you want to register.
        public let resourceArn: String
        /// The identifier for the role that registers the resource.
        public let roleArn: String?
        /// Designates an Identity and Access Management (IAM) service-linked role by registering this role with the Data Catalog. A service-linked role is a unique type of IAM role that is linked directly to Lake Formation. For more information, see Using Service-Linked Roles for Lake Formation.
        public let useServiceLinkedRole: Bool?
        /// Whether or not the resource is a federated resource.
        public let withFederation: Bool?
        /// Grants the calling principal the permissions to perform all supported Lake Formation operations on the registered data location.
        public let withPrivilegedAccess: Bool?

        @inlinable
        public init(hybridAccessEnabled: Bool? = nil, resourceArn: String, roleArn: String? = nil, useServiceLinkedRole: Bool? = nil, withFederation: Bool? = nil, withPrivilegedAccess: Bool? = nil) {
            self.hybridAccessEnabled = hybridAccessEnabled
            self.resourceArn = resourceArn
            self.roleArn = roleArn
            self.useServiceLinkedRole = useServiceLinkedRole
            self.withFederation = withFederation
            self.withPrivilegedAccess = withPrivilegedAccess
        }

        public func validate(name: String) throws {
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:aws:iam::[0-9]*:role/")
        }

        private enum CodingKeys: String, CodingKey {
            case hybridAccessEnabled = "HybridAccessEnabled"
            case resourceArn = "ResourceArn"
            case roleArn = "RoleArn"
            case useServiceLinkedRole = "UseServiceLinkedRole"
            case withFederation = "WithFederation"
            case withPrivilegedAccess = "WithPrivilegedAccess"
        }
    }

    public struct RegisterResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct RemoveLFTagsFromResourceRequest: AWSEncodableShape {
        /// The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment.
        public let catalogId: String?
        /// The LF-tags to be removed from the resource.
        public let lfTags: [LFTagPair]
        /// The database, table, or column resource where you want to remove an LF-tag.
        public let resource: Resource

        @inlinable
        public init(catalogId: String? = nil, lfTags: [LFTagPair], resource: Resource) {
            self.catalogId = catalogId
            self.lfTags = lfTags
            self.resource = resource
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.lfTags.forEach {
                try $0.validate(name: "\(name).lfTags[]")
            }
            try self.validate(self.lfTags, name: "lfTags", parent: name, max: 50)
            try self.validate(self.lfTags, name: "lfTags", parent: name, min: 1)
            try self.resource.validate(name: "\(name).resource")
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case lfTags = "LFTags"
            case resource = "Resource"
        }
    }

    public struct RemoveLFTagsFromResourceResponse: AWSDecodableShape {
        /// A list of failures to untag a resource.
        public let failures: [LFTagError]?

        @inlinable
        public init(failures: [LFTagError]? = nil) {
            self.failures = failures
        }

        private enum CodingKeys: String, CodingKey {
            case failures = "Failures"
        }
    }

    public struct Resource: AWSEncodableShape & AWSDecodableShape {
        /// The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment.
        public let catalog: CatalogResource?
        /// The database for the resource. Unique to the Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database permissions to a principal.
        public let database: DatabaseResource?
        /// A data cell filter.
        public let dataCellsFilter: DataCellsFilterResource?
        /// The location of an Amazon S3 path where permissions are granted or revoked.
        public let dataLocation: DataLocationResource?
        /// The LF-tag key and values attached to a resource.
        public let lfTag: LFTagKeyResource?
        /// LF-Tag expression resource. A logical expression composed of one or more LF-Tag key:value pairs.
        public let lfTagExpression: LFTagExpressionResource?
        /// A list of LF-tag conditions or saved LF-Tag expressions that define a resource's LF-tag policy.
        public let lfTagPolicy: LFTagPolicyResource?
        /// The table for the resource. A table is a metadata definition that represents your data. You can Grant and Revoke table privileges to a principal.
        public let table: TableResource?
        /// The table with columns for the resource. A principal with permissions to this resource can select metadata from the columns of a table in the Data Catalog and the underlying data in Amazon S3.
        public let tableWithColumns: TableWithColumnsResource?

        @inlinable
        public init(catalog: CatalogResource? = nil, database: DatabaseResource? = nil, dataCellsFilter: DataCellsFilterResource? = nil, dataLocation: DataLocationResource? = nil, lfTag: LFTagKeyResource? = nil, lfTagExpression: LFTagExpressionResource? = nil, lfTagPolicy: LFTagPolicyResource? = nil, table: TableResource? = nil, tableWithColumns: TableWithColumnsResource? = nil) {
            self.catalog = catalog
            self.database = database
            self.dataCellsFilter = dataCellsFilter
            self.dataLocation = dataLocation
            self.lfTag = lfTag
            self.lfTagExpression = lfTagExpression
            self.lfTagPolicy = lfTagPolicy
            self.table = table
            self.tableWithColumns = tableWithColumns
        }

        public func validate(name: String) throws {
            try self.catalog?.validate(name: "\(name).catalog")
            try self.database?.validate(name: "\(name).database")
            try self.dataCellsFilter?.validate(name: "\(name).dataCellsFilter")
            try self.dataLocation?.validate(name: "\(name).dataLocation")
            try self.lfTag?.validate(name: "\(name).lfTag")
            try self.lfTagExpression?.validate(name: "\(name).lfTagExpression")
            try self.lfTagPolicy?.validate(name: "\(name).lfTagPolicy")
            try self.table?.validate(name: "\(name).table")
            try self.tableWithColumns?.validate(name: "\(name).tableWithColumns")
        }

        private enum CodingKeys: String, CodingKey {
            case catalog = "Catalog"
            case database = "Database"
            case dataCellsFilter = "DataCellsFilter"
            case dataLocation = "DataLocation"
            case lfTag = "LFTag"
            case lfTagExpression = "LFTagExpression"
            case lfTagPolicy = "LFTagPolicy"
            case table = "Table"
            case tableWithColumns = "TableWithColumns"
        }
    }

    public struct ResourceInfo: AWSDecodableShape {
        ///  Indicates whether the data access of tables pointing to the location can be managed by both Lake Formation permissions as well as Amazon S3 bucket policies.
        public let hybridAccessEnabled: Bool?
        /// The date and time the resource was last modified.
        public let lastModified: Date?
        /// The Amazon Resource Name (ARN) of the resource.
        public let resourceArn: String?
        /// The IAM role that registered a resource.
        public let roleArn: String?
        /// Whether or not the resource is a federated resource.
        public let withFederation: Bool?
        /// Grants the calling principal the permissions to perform all supported Lake Formation operations on the registered data location.
        public let withPrivilegedAccess: Bool?

        @inlinable
        public init(hybridAccessEnabled: Bool? = nil, lastModified: Date? = nil, resourceArn: String? = nil, roleArn: String? = nil, withFederation: Bool? = nil, withPrivilegedAccess: Bool? = nil) {
            self.hybridAccessEnabled = hybridAccessEnabled
            self.lastModified = lastModified
            self.resourceArn = resourceArn
            self.roleArn = roleArn
            self.withFederation = withFederation
            self.withPrivilegedAccess = withPrivilegedAccess
        }

        private enum CodingKeys: String, CodingKey {
            case hybridAccessEnabled = "HybridAccessEnabled"
            case lastModified = "LastModified"
            case resourceArn = "ResourceArn"
            case roleArn = "RoleArn"
            case withFederation = "WithFederation"
            case withPrivilegedAccess = "WithPrivilegedAccess"
        }
    }

    public struct RevokePermissionsRequest: AWSEncodableShape {
        /// The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment.
        public let catalogId: String?
        public let condition: Condition?
        /// The permissions revoked to the principal on the resource. For information about permissions, see Security and Access Control to Metadata and Data.
        public let permissions: [Permission]
        /// Indicates a list of permissions for which to revoke the grant option allowing the principal to pass permissions to other principals.
        public let permissionsWithGrantOption: [Permission]?
        /// The principal to be revoked permissions on the resource.
        public let principal: DataLakePrincipal
        /// The resource to which permissions are to be revoked.
        public let resource: Resource

        @inlinable
        public init(catalogId: String? = nil, condition: Condition? = nil, permissions: [Permission], permissionsWithGrantOption: [Permission]? = nil, principal: DataLakePrincipal, resource: Resource) {
            self.catalogId = catalogId
            self.condition = condition
            self.permissions = permissions
            self.permissionsWithGrantOption = permissionsWithGrantOption
            self.principal = principal
            self.resource = resource
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.condition?.validate(name: "\(name).condition")
            try self.principal.validate(name: "\(name).principal")
            try self.resource.validate(name: "\(name).resource")
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case condition = "Condition"
            case permissions = "Permissions"
            case permissionsWithGrantOption = "PermissionsWithGrantOption"
            case principal = "Principal"
            case resource = "Resource"
        }
    }

    public struct RevokePermissionsResponse: AWSDecodableShape {
        public init() {}
    }

    public struct RowFilter: AWSEncodableShape & AWSDecodableShape {
        /// A wildcard for all rows.
        public let allRowsWildcard: AllRowsWildcard?
        /// A filter expression.
        public let filterExpression: String?

        @inlinable
        public init(allRowsWildcard: AllRowsWildcard? = nil, filterExpression: String? = nil) {
            self.allRowsWildcard = allRowsWildcard
            self.filterExpression = filterExpression
        }

        public func validate(name: String) throws {
            try self.validate(self.filterExpression, name: "filterExpression", parent: name, max: 2048)
            try self.validate(self.filterExpression, name: "filterExpression", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case allRowsWildcard = "AllRowsWildcard"
            case filterExpression = "FilterExpression"
        }
    }

    public struct SearchDatabasesByLFTagsRequest: AWSEncodableShape {
        /// The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment.
        public let catalogId: String?
        /// A list of conditions (LFTag structures) to search for in database resources.
        public let expression: [LFTag]
        /// The maximum number of results to return.
        public let maxResults: Int?
        /// A continuation token, if this is not the first call to retrieve this list.
        public let nextToken: String?

        @inlinable
        public init(catalogId: String? = nil, expression: [LFTag], maxResults: Int? = nil, nextToken: String? = nil) {
            self.catalogId = catalogId
            self.expression = expression
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.expression.forEach {
                try $0.validate(name: "\(name).expression[]")
            }
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case expression = "Expression"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct SearchDatabasesByLFTagsResponse: AWSDecodableShape {
        /// A list of databases that meet the LF-tag conditions.
        public let databaseList: [TaggedDatabase]?
        /// A continuation token, present if the current list segment is not the last.
        public let nextToken: String?

        @inlinable
        public init(databaseList: [TaggedDatabase]? = nil, nextToken: String? = nil) {
            self.databaseList = databaseList
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case databaseList = "DatabaseList"
            case nextToken = "NextToken"
        }
    }

    public struct SearchTablesByLFTagsRequest: AWSEncodableShape {
        /// The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment.
        public let catalogId: String?
        /// A list of conditions (LFTag structures) to search for in table resources.
        public let expression: [LFTag]
        /// The maximum number of results to return.
        public let maxResults: Int?
        /// A continuation token, if this is not the first call to retrieve this list.
        public let nextToken: String?

        @inlinable
        public init(catalogId: String? = nil, expression: [LFTag], maxResults: Int? = nil, nextToken: String? = nil) {
            self.catalogId = catalogId
            self.expression = expression
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.expression.forEach {
                try $0.validate(name: "\(name).expression[]")
            }
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case expression = "Expression"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct SearchTablesByLFTagsResponse: AWSDecodableShape {
        /// A continuation token, present if the current list segment is not the last. On the first run, if you include a not null (a value) token you can get empty pages.
        public let nextToken: String?
        /// A list of tables that meet the LF-tag conditions.
        public let tableList: [TaggedTable]?

        @inlinable
        public init(nextToken: String? = nil, tableList: [TaggedTable]? = nil) {
            self.nextToken = nextToken
            self.tableList = tableList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case tableList = "TableList"
        }
    }

    public struct StartQueryPlanningRequest: AWSEncodableShape {
        /// A structure containing information about the query plan.
        public let queryPlanningContext: QueryPlanningContext
        /// A PartiQL query statement used as an input to the planner service.
        public let queryString: String

        @inlinable
        public init(queryPlanningContext: QueryPlanningContext, queryString: String) {
            self.queryPlanningContext = queryPlanningContext
            self.queryString = queryString
        }

        public func validate(name: String) throws {
            try self.queryPlanningContext.validate(name: "\(name).queryPlanningContext")
            try self.validate(self.queryString, name: "queryString", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case queryPlanningContext = "QueryPlanningContext"
            case queryString = "QueryString"
        }
    }

    public struct StartQueryPlanningResponse: AWSDecodableShape {
        /// The ID of the plan query operation can be used to fetch the actual work unit descriptors that are produced as the result of the operation. The ID is also used to get the query state and as an input to the Execute operation.
        public let queryId: String

        @inlinable
        public init(queryId: String) {
            self.queryId = queryId
        }

        private enum CodingKeys: String, CodingKey {
            case queryId = "QueryId"
        }
    }

    public struct StartTransactionRequest: AWSEncodableShape {
        /// Indicates whether this transaction should be read only or read and write. Writes made using a read-only transaction ID will be rejected. Read-only transactions do not need to be committed.
        public let transactionType: TransactionType?

        @inlinable
        public init(transactionType: TransactionType? = nil) {
            self.transactionType = transactionType
        }

        private enum CodingKeys: String, CodingKey {
            case transactionType = "TransactionType"
        }
    }

    public struct StartTransactionResponse: AWSDecodableShape {
        /// An opaque identifier for the transaction.
        public let transactionId: String?

        @inlinable
        public init(transactionId: String? = nil) {
            self.transactionId = transactionId
        }

        private enum CodingKeys: String, CodingKey {
            case transactionId = "TransactionId"
        }
    }

    public struct StorageOptimizer: AWSDecodableShape {
        /// A map of the storage optimizer configuration. Currently contains only one key-value pair: is_enabled indicates true or false for acceleration.
        public let config: [String: String]?
        /// A message that contains information about any error (if present). When an acceleration result has an enabled status, the error message is empty. When an acceleration result has a disabled status, the message describes an error or simply indicates "disabled by the user".
        public let errorMessage: String?
        /// When an acceleration result has an enabled status, contains the details of the last job run.
        public let lastRunDetails: String?
        /// The specific type of storage optimizer. The supported value is compaction.
        public let storageOptimizerType: OptimizerType?
        /// A message that contains information about any warnings (if present).
        public let warnings: String?

        @inlinable
        public init(config: [String: String]? = nil, errorMessage: String? = nil, lastRunDetails: String? = nil, storageOptimizerType: OptimizerType? = nil, warnings: String? = nil) {
            self.config = config
            self.errorMessage = errorMessage
            self.lastRunDetails = lastRunDetails
            self.storageOptimizerType = storageOptimizerType
            self.warnings = warnings
        }

        private enum CodingKeys: String, CodingKey {
            case config = "Config"
            case errorMessage = "ErrorMessage"
            case lastRunDetails = "LastRunDetails"
            case storageOptimizerType = "StorageOptimizerType"
            case warnings = "Warnings"
        }
    }

    public struct TableObject: AWSDecodableShape {
        /// The Amazon S3 ETag of the object. Returned by GetTableObjects for validation and used to identify changes to the underlying data.
        public let eTag: String?
        /// The size of the Amazon S3 object in bytes.
        public let size: Int64?
        /// The Amazon S3 location of the object.
        public let uri: String?

        @inlinable
        public init(eTag: String? = nil, size: Int64? = nil, uri: String? = nil) {
            self.eTag = eTag
            self.size = size
            self.uri = uri
        }

        private enum CodingKeys: String, CodingKey {
            case eTag = "ETag"
            case size = "Size"
            case uri = "Uri"
        }
    }

    public struct TableResource: AWSEncodableShape & AWSDecodableShape {
        /// The identifier for the Data Catalog. By default, it is the account ID of the caller.
        public let catalogId: String?
        /// The name of the database for the table. Unique to a Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database privileges to a principal.
        public let databaseName: String
        /// The name of the table.
        public let name: String?
        /// A wildcard object representing every table under a database. At least one of TableResource$Name or TableResource$TableWildcard is required.
        public let tableWildcard: TableWildcard?

        @inlinable
        public init(catalogId: String? = nil, databaseName: String, name: String? = nil, tableWildcard: TableWildcard? = nil) {
            self.catalogId = catalogId
            self.databaseName = databaseName
            self.name = name
            self.tableWildcard = tableWildcard
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.databaseName, name: "databaseName", parent: name, max: 255)
            try self.validate(self.databaseName, name: "databaseName", parent: name, min: 1)
            try self.validate(self.databaseName, name: "databaseName", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.name, name: "name", parent: name, max: 255)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case databaseName = "DatabaseName"
            case name = "Name"
            case tableWildcard = "TableWildcard"
        }
    }

    public struct TableWildcard: AWSEncodableShape & AWSDecodableShape {
        public init() {}
    }

    public struct TableWithColumnsResource: AWSEncodableShape & AWSDecodableShape {
        /// The identifier for the Data Catalog. By default, it is the account ID of the caller.
        public let catalogId: String?
        /// The list of column names for the table. At least one of ColumnNames or ColumnWildcard is required.
        public let columnNames: [String]?
        /// A wildcard specified by a ColumnWildcard object. At least one of ColumnNames or ColumnWildcard is required.
        public let columnWildcard: ColumnWildcard?
        /// The name of the database for the table with columns resource. Unique to the Data Catalog. A database is a set of associated table definitions organized into a logical group. You can Grant and Revoke database privileges to a principal.
        public let databaseName: String
        /// The name of the table resource. A table is a metadata definition that represents your data. You can Grant and Revoke table privileges to a principal.
        public let name: String

        @inlinable
        public init(catalogId: String? = nil, columnNames: [String]? = nil, columnWildcard: ColumnWildcard? = nil, databaseName: String, name: String) {
            self.catalogId = catalogId
            self.columnNames = columnNames
            self.columnWildcard = columnWildcard
            self.databaseName = databaseName
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.columnNames?.forEach {
                try validate($0, name: "columnNames[]", parent: name, max: 255)
                try validate($0, name: "columnNames[]", parent: name, min: 1)
                try validate($0, name: "columnNames[]", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            }
            try self.columnWildcard?.validate(name: "\(name).columnWildcard")
            try self.validate(self.databaseName, name: "databaseName", parent: name, max: 255)
            try self.validate(self.databaseName, name: "databaseName", parent: name, min: 1)
            try self.validate(self.databaseName, name: "databaseName", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.name, name: "name", parent: name, max: 255)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case columnNames = "ColumnNames"
            case columnWildcard = "ColumnWildcard"
            case databaseName = "DatabaseName"
            case name = "Name"
        }
    }

    public struct TaggedDatabase: AWSDecodableShape {
        /// A database that has LF-tags attached to it.
        public let database: DatabaseResource?
        /// A list of LF-tags attached to the database.
        public let lfTags: [LFTagPair]?

        @inlinable
        public init(database: DatabaseResource? = nil, lfTags: [LFTagPair]? = nil) {
            self.database = database
            self.lfTags = lfTags
        }

        private enum CodingKeys: String, CodingKey {
            case database = "Database"
            case lfTags = "LFTags"
        }
    }

    public struct TaggedTable: AWSDecodableShape {
        /// A list of LF-tags attached to the database where the table resides.
        public let lfTagOnDatabase: [LFTagPair]?
        /// A list of LF-tags attached to columns in the table.
        public let lfTagsOnColumns: [ColumnLFTag]?
        /// A list of LF-tags attached to the table.
        public let lfTagsOnTable: [LFTagPair]?
        /// A table that has LF-tags attached to it.
        public let table: TableResource?

        @inlinable
        public init(lfTagOnDatabase: [LFTagPair]? = nil, lfTagsOnColumns: [ColumnLFTag]? = nil, lfTagsOnTable: [LFTagPair]? = nil, table: TableResource? = nil) {
            self.lfTagOnDatabase = lfTagOnDatabase
            self.lfTagsOnColumns = lfTagsOnColumns
            self.lfTagsOnTable = lfTagsOnTable
            self.table = table
        }

        private enum CodingKeys: String, CodingKey {
            case lfTagOnDatabase = "LFTagOnDatabase"
            case lfTagsOnColumns = "LFTagsOnColumns"
            case lfTagsOnTable = "LFTagsOnTable"
            case table = "Table"
        }
    }

    public struct TransactionDescription: AWSDecodableShape {
        /// The time when the transaction committed or aborted, if it is not currently active.
        public let transactionEndTime: Date?
        /// The ID of the transaction.
        public let transactionId: String?
        /// The time when the transaction started.
        public let transactionStartTime: Date?
        /// A status of ACTIVE, COMMITTED, or ABORTED.
        public let transactionStatus: TransactionStatus?

        @inlinable
        public init(transactionEndTime: Date? = nil, transactionId: String? = nil, transactionStartTime: Date? = nil, transactionStatus: TransactionStatus? = nil) {
            self.transactionEndTime = transactionEndTime
            self.transactionId = transactionId
            self.transactionStartTime = transactionStartTime
            self.transactionStatus = transactionStatus
        }

        private enum CodingKeys: String, CodingKey {
            case transactionEndTime = "TransactionEndTime"
            case transactionId = "TransactionId"
            case transactionStartTime = "TransactionStartTime"
            case transactionStatus = "TransactionStatus"
        }
    }

    public struct UpdateDataCellsFilterRequest: AWSEncodableShape {
        /// A DataCellsFilter structure containing information about the data cells filter.
        public let tableData: DataCellsFilter

        @inlinable
        public init(tableData: DataCellsFilter) {
            self.tableData = tableData
        }

        public func validate(name: String) throws {
            try self.tableData.validate(name: "\(name).tableData")
        }

        private enum CodingKeys: String, CodingKey {
            case tableData = "TableData"
        }
    }

    public struct UpdateDataCellsFilterResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateLFTagExpressionRequest: AWSEncodableShape {
        /// The identifier for the Data Catalog. By default, the account ID.
        public let catalogId: String?
        /// The description with information about the saved LF-Tag expression.
        public let description: String?
        /// The LF-Tag expression body composed of one more LF-Tag key-value pairs.
        public let expression: [LFTag]
        /// The name for the LF-Tag expression.
        public let name: String

        @inlinable
        public init(catalogId: String? = nil, description: String? = nil, expression: [LFTag], name: String) {
            self.catalogId = catalogId
            self.description = description
            self.expression = expression
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.description, name: "description", parent: name, max: 2048)
            try self.validate(self.description, name: "description", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
            try self.expression.forEach {
                try $0.validate(name: "\(name).expression[]")
            }
            try self.validate(self.name, name: "name", parent: name, max: 255)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case description = "Description"
            case expression = "Expression"
            case name = "Name"
        }
    }

    public struct UpdateLFTagExpressionResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateLFTagRequest: AWSEncodableShape {
        /// The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment.
        public let catalogId: String?
        /// The key-name for the LF-tag for which to add or delete values.
        public let tagKey: String
        /// A list of LF-tag values to add from the LF-tag.
        public let tagValuesToAdd: [String]?
        /// A list of LF-tag values to delete from the LF-tag.
        public let tagValuesToDelete: [String]?

        @inlinable
        public init(catalogId: String? = nil, tagKey: String, tagValuesToAdd: [String]? = nil, tagValuesToDelete: [String]? = nil) {
            self.catalogId = catalogId
            self.tagKey = tagKey
            self.tagValuesToAdd = tagValuesToAdd
            self.tagValuesToDelete = tagValuesToDelete
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.tagKey, name: "tagKey", parent: name, max: 128)
            try self.validate(self.tagKey, name: "tagKey", parent: name, min: 1)
            try self.validate(self.tagKey, name: "tagKey", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:\\/=+\\-@%]*)$")
            try self.tagValuesToAdd?.forEach {
                try validate($0, name: "tagValuesToAdd[]", parent: name, max: 256)
                try validate($0, name: "tagValuesToAdd[]", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:\\*\\/=+\\-@%]*)$")
            }
            try self.validate(self.tagValuesToAdd, name: "tagValuesToAdd", parent: name, max: 50)
            try self.validate(self.tagValuesToAdd, name: "tagValuesToAdd", parent: name, min: 1)
            try self.tagValuesToDelete?.forEach {
                try validate($0, name: "tagValuesToDelete[]", parent: name, max: 256)
                try validate($0, name: "tagValuesToDelete[]", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:\\*\\/=+\\-@%]*)$")
            }
            try self.validate(self.tagValuesToDelete, name: "tagValuesToDelete", parent: name, max: 50)
            try self.validate(self.tagValuesToDelete, name: "tagValuesToDelete", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case tagKey = "TagKey"
            case tagValuesToAdd = "TagValuesToAdd"
            case tagValuesToDelete = "TagValuesToDelete"
        }
    }

    public struct UpdateLFTagResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateLakeFormationIdentityCenterConfigurationRequest: AWSEncodableShape {
        /// Allows to enable or disable the IAM Identity Center connection.
        public let applicationStatus: ApplicationStatus?
        /// The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, view definitions, and other control information to manage your Lake Formation environment.
        public let catalogId: String?
        /// A list of the account IDs of Amazon Web Services accounts of third-party applications that are allowed to access data managed by Lake Formation.
        public let externalFiltering: ExternalFilteringConfiguration?
        /// A list of Amazon Web Services account IDs or Amazon Web Services organization/organizational unit ARNs that are allowed to access to access data managed by Lake Formation.  If the ShareRecipients list includes valid values, then the resource share is updated with the principals you want to have access to the resources. If the ShareRecipients value is null, both the list of share recipients and the resource share remain unchanged. If the ShareRecipients value is an empty list, then the existing share recipients list will be cleared, and the resource share will be deleted.
        public let shareRecipients: [DataLakePrincipal]?

        @inlinable
        public init(applicationStatus: ApplicationStatus? = nil, catalogId: String? = nil, externalFiltering: ExternalFilteringConfiguration? = nil, shareRecipients: [DataLakePrincipal]? = nil) {
            self.applicationStatus = applicationStatus
            self.catalogId = catalogId
            self.externalFiltering = externalFiltering
            self.shareRecipients = shareRecipients
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.shareRecipients?.forEach {
                try $0.validate(name: "\(name).shareRecipients[]")
            }
            try self.validate(self.shareRecipients, name: "shareRecipients", parent: name, max: 30)
        }

        private enum CodingKeys: String, CodingKey {
            case applicationStatus = "ApplicationStatus"
            case catalogId = "CatalogId"
            case externalFiltering = "ExternalFiltering"
            case shareRecipients = "ShareRecipients"
        }
    }

    public struct UpdateLakeFormationIdentityCenterConfigurationResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateResourceRequest: AWSEncodableShape {
        ///  Specifies whether the data access of tables pointing to the location can be managed by both Lake Formation permissions as well as Amazon S3 bucket policies.
        public let hybridAccessEnabled: Bool?
        /// The resource ARN.
        public let resourceArn: String
        /// The new role to use for the given resource registered in Lake Formation.
        public let roleArn: String
        /// Whether or not the resource is a federated resource.
        public let withFederation: Bool?

        @inlinable
        public init(hybridAccessEnabled: Bool? = nil, resourceArn: String, roleArn: String, withFederation: Bool? = nil) {
            self.hybridAccessEnabled = hybridAccessEnabled
            self.resourceArn = resourceArn
            self.roleArn = roleArn
            self.withFederation = withFederation
        }

        public func validate(name: String) throws {
            try self.validate(self.roleArn, name: "roleArn", parent: name, pattern: "^arn:aws:iam::[0-9]*:role/")
        }

        private enum CodingKeys: String, CodingKey {
            case hybridAccessEnabled = "HybridAccessEnabled"
            case resourceArn = "ResourceArn"
            case roleArn = "RoleArn"
            case withFederation = "WithFederation"
        }
    }

    public struct UpdateResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateTableObjectsRequest: AWSEncodableShape {
        /// The catalog containing the governed table to update. Defaults to the caller’s account ID.
        public let catalogId: String?
        /// The database containing the governed table to update.
        public let databaseName: String
        /// The governed table to update.
        public let tableName: String
        /// The transaction at which to do the write.
        public let transactionId: String?
        /// A list of WriteOperation objects that define an object to add to or delete from the manifest for a governed table.
        public let writeOperations: [WriteOperation]

        @inlinable
        public init(catalogId: String? = nil, databaseName: String, tableName: String, transactionId: String? = nil, writeOperations: [WriteOperation]) {
            self.catalogId = catalogId
            self.databaseName = databaseName
            self.tableName = tableName
            self.transactionId = transactionId
            self.writeOperations = writeOperations
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.databaseName, name: "databaseName", parent: name, max: 255)
            try self.validate(self.databaseName, name: "databaseName", parent: name, min: 1)
            try self.validate(self.databaseName, name: "databaseName", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.tableName, name: "tableName", parent: name, max: 255)
            try self.validate(self.tableName, name: "tableName", parent: name, min: 1)
            try self.validate(self.tableName, name: "tableName", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.transactionId, name: "transactionId", parent: name, max: 255)
            try self.validate(self.transactionId, name: "transactionId", parent: name, min: 1)
            try self.validate(self.transactionId, name: "transactionId", parent: name, pattern: "^[\\p{L}\\p{N}\\p{P}]*$")
            try self.writeOperations.forEach {
                try $0.validate(name: "\(name).writeOperations[]")
            }
            try self.validate(self.writeOperations, name: "writeOperations", parent: name, max: 100)
            try self.validate(self.writeOperations, name: "writeOperations", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case databaseName = "DatabaseName"
            case tableName = "TableName"
            case transactionId = "TransactionId"
            case writeOperations = "WriteOperations"
        }
    }

    public struct UpdateTableObjectsResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateTableStorageOptimizerRequest: AWSEncodableShape {
        /// The Catalog ID of the table.
        public let catalogId: String?
        /// Name of the database where the table is present.
        public let databaseName: String
        /// Name of the configuration for the storage optimizer.
        public let storageOptimizerConfig: [OptimizerType: [String: String]]
        /// Name of the table for which to enable the storage optimizer.
        public let tableName: String

        @inlinable
        public init(catalogId: String? = nil, databaseName: String, storageOptimizerConfig: [OptimizerType: [String: String]], tableName: String) {
            self.catalogId = catalogId
            self.databaseName = databaseName
            self.storageOptimizerConfig = storageOptimizerConfig
            self.tableName = tableName
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 255)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.databaseName, name: "databaseName", parent: name, max: 255)
            try self.validate(self.databaseName, name: "databaseName", parent: name, min: 1)
            try self.validate(self.databaseName, name: "databaseName", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
            try self.validate(self.tableName, name: "tableName", parent: name, max: 255)
            try self.validate(self.tableName, name: "tableName", parent: name, min: 1)
            try self.validate(self.tableName, name: "tableName", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case databaseName = "DatabaseName"
            case storageOptimizerConfig = "StorageOptimizerConfig"
            case tableName = "TableName"
        }
    }

    public struct UpdateTableStorageOptimizerResponse: AWSDecodableShape {
        /// A response indicating the success of failure of the operation.
        public let result: String?

        @inlinable
        public init(result: String? = nil) {
            self.result = result
        }

        private enum CodingKeys: String, CodingKey {
            case result = "Result"
        }
    }

    public struct VirtualObject: AWSEncodableShape {
        /// The ETag of the Amazon S3 object.
        public let eTag: String?
        /// The path to the Amazon S3 object. Must start with s3://
        public let uri: String

        @inlinable
        public init(eTag: String? = nil, uri: String) {
            self.eTag = eTag
            self.uri = uri
        }

        public func validate(name: String) throws {
            try self.validate(self.eTag, name: "eTag", parent: name, max: 255)
            try self.validate(self.eTag, name: "eTag", parent: name, min: 1)
            try self.validate(self.eTag, name: "eTag", parent: name, pattern: "^[\\p{L}\\p{N}\\p{P}]*$")
            try self.validate(self.uri, name: "uri", parent: name, max: 1024)
            try self.validate(self.uri, name: "uri", parent: name, min: 1)
            try self.validate(self.uri, name: "uri", parent: name, pattern: "^[\\u0020-\\uD7FF\\uE000-\\uFFFD\\uD800\\uDC00-\\uDBFF\\uDFFF\\r\\n\\t]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case eTag = "ETag"
            case uri = "Uri"
        }
    }

    public struct WorkUnitRange: AWSDecodableShape {
        /// Defines the maximum work unit ID in the range. The maximum value is inclusive.
        public let workUnitIdMax: Int64
        /// Defines the minimum work unit ID in the range.
        public let workUnitIdMin: Int64
        /// A work token used to query the execution service.
        public let workUnitToken: String

        @inlinable
        public init(workUnitIdMax: Int64, workUnitIdMin: Int64, workUnitToken: String) {
            self.workUnitIdMax = workUnitIdMax
            self.workUnitIdMin = workUnitIdMin
            self.workUnitToken = workUnitToken
        }

        private enum CodingKeys: String, CodingKey {
            case workUnitIdMax = "WorkUnitIdMax"
            case workUnitIdMin = "WorkUnitIdMin"
            case workUnitToken = "WorkUnitToken"
        }
    }

    public struct WriteOperation: AWSEncodableShape {
        /// A new object to add to the governed table.
        public let addObject: AddObjectInput?
        /// An object to delete from the governed table.
        public let deleteObject: DeleteObjectInput?

        @inlinable
        public init(addObject: AddObjectInput? = nil, deleteObject: DeleteObjectInput? = nil) {
            self.addObject = addObject
            self.deleteObject = deleteObject
        }

        public func validate(name: String) throws {
            try self.addObject?.validate(name: "\(name).addObject")
            try self.deleteObject?.validate(name: "\(name).deleteObject")
        }

        private enum CodingKeys: String, CodingKey {
            case addObject = "AddObject"
            case deleteObject = "DeleteObject"
        }
    }
}

// MARK: - Errors

/// Error enum for LakeFormation
public struct LakeFormationErrorType: AWSErrorType {
    enum Code: String {
        case accessDeniedException = "AccessDeniedException"
        case alreadyExistsException = "AlreadyExistsException"
        case concurrentModificationException = "ConcurrentModificationException"
        case entityNotFoundException = "EntityNotFoundException"
        case expiredException = "ExpiredException"
        case glueEncryptionException = "GlueEncryptionException"
        case internalServiceException = "InternalServiceException"
        case invalidInputException = "InvalidInputException"
        case operationTimeoutException = "OperationTimeoutException"
        case permissionTypeMismatchException = "PermissionTypeMismatchException"
        case resourceNotReadyException = "ResourceNotReadyException"
        case resourceNumberLimitExceededException = "ResourceNumberLimitExceededException"
        case statisticsNotReadyYetException = "StatisticsNotReadyYetException"
        case throttledException = "ThrottledException"
        case transactionCanceledException = "TransactionCanceledException"
        case transactionCommitInProgressException = "TransactionCommitInProgressException"
        case transactionCommittedException = "TransactionCommittedException"
        case workUnitsNotReadyYetException = "WorkUnitsNotReadyYetException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize LakeFormation
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// Access to a resource was denied.
    public static var accessDeniedException: Self { .init(.accessDeniedException) }
    /// A resource to be created or added already exists.
    public static var alreadyExistsException: Self { .init(.alreadyExistsException) }
    /// Two processes are trying to modify a resource simultaneously.
    public static var concurrentModificationException: Self { .init(.concurrentModificationException) }
    /// A specified entity does not exist.
    public static var entityNotFoundException: Self { .init(.entityNotFoundException) }
    /// Contains details about an error where the query request expired.
    public static var expiredException: Self { .init(.expiredException) }
    /// An encryption operation failed.
    public static var glueEncryptionException: Self { .init(.glueEncryptionException) }
    /// An internal service error occurred.
    public static var internalServiceException: Self { .init(.internalServiceException) }
    /// The input provided was not valid.
    public static var invalidInputException: Self { .init(.invalidInputException) }
    /// The operation timed out.
    public static var operationTimeoutException: Self { .init(.operationTimeoutException) }
    /// The engine does not support filtering data based on the enforced permissions. For example, if you call the GetTemporaryGlueTableCredentials operation with SupportedPermissionType equal to ColumnPermission, but cell-level permissions exist on the table, this exception is thrown.
    public static var permissionTypeMismatchException: Self { .init(.permissionTypeMismatchException) }
    /// Contains details about an error related to a resource which is not ready for a transaction.
    public static var resourceNotReadyException: Self { .init(.resourceNotReadyException) }
    /// A resource numerical limit was exceeded.
    public static var resourceNumberLimitExceededException: Self { .init(.resourceNumberLimitExceededException) }
    /// Contains details about an error related to statistics not being ready.
    public static var statisticsNotReadyYetException: Self { .init(.statisticsNotReadyYetException) }
    /// Contains details about an error where the query request was throttled.
    public static var throttledException: Self { .init(.throttledException) }
    /// Contains details about an error related to a transaction that was cancelled.
    public static var transactionCanceledException: Self { .init(.transactionCanceledException) }
    /// Contains details about an error related to a transaction commit that was in progress.
    public static var transactionCommitInProgressException: Self { .init(.transactionCommitInProgressException) }
    /// Contains details about an error where the specified transaction has already been committed and cannot be used for UpdateTableObjects.
    public static var transactionCommittedException: Self { .init(.transactionCommittedException) }
    /// Contains details about an error related to work units not being ready.
    public static var workUnitsNotReadyYetException: Self { .init(.workUnitsNotReadyYetException) }
}

extension LakeFormationErrorType: Equatable {
    public static func == (lhs: LakeFormationErrorType, rhs: LakeFormationErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension LakeFormationErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
